bug-bash
[Top][All Lists]
Advanced

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

Re: Incomplete 'command not found' error message if command name contain


From: Robin A. Meade
Subject: Re: Incomplete 'command not found' error message if command name contains spaces
Date: Tue, 31 Mar 2015 14:03:31 -1000

It was fixed a year ago:

https://github.com/hughsie/PackageKit/commit/b8f5de2e0ceaf7424e4e2c94adc46fa06eefce73


On Tue, Mar 31, 2015 at 1:04 PM, Robin A. Meade <robin.a.meade@gmail.com> wrote:
ok, thanks. If I run bash with no startup files, I get expected output.

With my regular start-up files:

$ declare -f command_not_found_handle
command_not_found_handle ()
{
    runcnf=1;
    retval=127;
    [ ! -S /var/run/dbus/system_bus_socket ] && runcnf=0;
    [ ! -x /usr/libexec/packagekitd ] && runcnf=0;
    if [ $runcnf -eq 1 ]; then
        /usr/libexec/pk-command-not-found $@;
        retval=$?;
    else
        echo "bash: $1: command not found";
    fi;
    return $retval
}


Which I found is defined in /etc/profile.d/PackageKit.sh

Putting double-quotes around $@ seems to fix it. I'll post bug report to appropriate maintainer.




On Tue, Mar 31, 2015 at 12:38 PM, Eduardo A. Bustamante López <dualbus@gmail.com> wrote:
Cannot reproduce with these versions:

dualbus@yaqui:~/local/src/gnu/bash$ "a nonexistent command name with spaces"
bash: a nonexistent command name with spaces: command not found
dualbus@yaqui:~/local/src/gnu/bash$
GNU bash, version 4.4.0(1)-devel (x86_64-unknown-linux-gnu)

dualbus@yaqui:~$ "a nonexistent command name with spaces"
bash: a nonexistent command name with spaces: command not found
dualbus@yaqui:~$
GNU bash, version 4.3.33(1)-release (x86_64-pc-linux-gnu)

dualbus@yaqui:~/local/src/gnu/bash$ "a nonexistent command name with spaces"
bash: a nonexistent command name with spaces: command not found
dualbus@yaqui:~/local/src/gnu/bash$
GNU bash, version 4.3.30(1)-release (x86_64-unknown-linux-gnu)


What's the output of: declare -f command_not_found_handle


--
Eduardo Bustamante | https://dualbus.me/



reply via email to

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