bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: command_not_found_handle documentation omission


From: Eduardo A . Bustamante López
Subject: Re: command_not_found_handle documentation omission
Date: Sun, 8 Oct 2017 15:11:13 -0500
User-agent: NeoMutt/20170609 (1.8.3)

On Sun, Oct 08, 2017 at 11:16:33AM -0500, Dan Douglas wrote:
[...]
> Thinking out loud some more... it does make sense that a user in an
> interactive session expects commands to not alter their shell environment,
> and a badly written command_not_found_handle could do that, possibly
> without the user's knowledge on systems that put a handler in a global
> bashrc (likely the most common scenario).
> 
> On the other hand a user that actually defines their own handler could
> have a million reasons to want to propagate some effect to the interactive
> process, e.g. defining an alias or altering PS1. Same for non-interactive
> scripts.
> 

I guess that instead of changing the semantics of
command_not_found_handle, a new special trap could be added that
executes in the context of the shell performing the command lookup.

Although I'm not sure how valuable it would be (the added complexity).
Are there any serious uses of the command_not_found_handle aside from
suggestions during interactive use?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]