Public bug reported:

Binary package hint: bash

When bash encounters a command that it can't locate, it calls the
function command_not_found_handle if available, which then usually calls
the python command-not-found script.

But bash only passes the first argument from the command line on to
command_not_found_handle. This is OK for the command-not-found script,
but makes it difficult to extend.

For example,  I have modified /etc/bash.bashrc to run this:
/usr/bin/python /usr/lib/command-not-found -- $1 || ssh $@ && return 0 || 
return 75

This allows me to type in the name of a machine I'd like to ssh to. As long as 
it isn't also the name of a program, then this works (and is very handy). But I 
can't do something like this:
[EMAIL PROTECTED]:$ remotehost -l archer
All that is passed to the command_not_found_handle function is 'remotehost', so 
the ssh never sees the other arguments.

Just to be clear: this is an issue with what is being passed to the
command_not_found_handle function, and not an issue with what happens
inside the function.

** Affects: bash (Ubuntu)
     Importance: Undecided
         Status: New

-- 
command_not_found_handle bash mechanism only passes single arg
https://bugs.launchpad.net/bugs/155899
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to