bug-bash
[Top][All Lists]
Advanced

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

Re: command not found magic


From: Ken Irving
Subject: Re: command not found magic
Date: Mon, 12 Jan 2009 13:56:21 -0900
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, Dec 04, 2008 at 09:37:58AM +0000, Stephane Chazelas wrote:
> On Thu, Dec 04, 2008 at 10:16:20AM +0100, Roman Rakus wrote:
> > probably you heard about this topic. It is invoked by ubuntu guys. See 
> > https://launchpad.net/ubuntu/+spec/command-not-found-magic
> > I would like to know, what do you think about it. It needs a small change 
> > in bash.
> [...]
> 
> A note about it. If ever it makes it to bash, maybe a good idea
> would be to call the handler command_not_found_handler instead
> of command_not_found_handle as it seems to make more sense (at
> least to me) and that's what zsh has chosen (for the same
> reason). See http://www.zsh.org/mla/workers/2007/msg00592.html
> So that one could use the same rc file for bash and zsh.

I'd second that.  Here's a patch for bash-4.0-rc1:

--- config-top.h.orig   2009-01-12 13:41:45.000000000 -0900
+++ config-top.h        2009-01-12 13:54:46.000000000 -0900
@@ -96,5 +96,5 @@
 
 /* This is used as the name of a shell function to call when a command
    name is not found.  If you want to name it something other than the
-   default ("command_not_found_handle"), change it here. */
-/* #define NOTFOUND_HOOK "command_not_found_handle" */
+   default ("command_not_found_handler"), change it here. */
+/* #define NOTFOUND_HOOK "command_not_found_handler" */

-- 
Ken Irving, fnkci@uaf.edu, 907-474-6152
Water and Environmental Research Center
Institute of Northern Engineering
University of Alaska, Fairbanks




reply via email to

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