bug-bash
[Top][All Lists]
Advanced

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

A programmable completoin bug?


From: Clark J. Wang
Subject: A programmable completoin bug?
Date: Wed, 30 Nov 2011 15:08:21 +0800

(Tested with bash 4.2.10 and 4.1.9)

[bash-4.2.10] # cat foo.compspec
compspec_foo()
{
    local cmd=$1 cur=$2 pre=$3

    if [[ $cur = :* ]]; then
        COMPREPLY=( changed changed/IGNORE_ME )
    fi
}

complete -F compspec_foo foo
[bash-4.2.10] # source foo.compspec
[bash-4.2.10] # foo :short<TAB>
[bash-4.2.10] # foo changed  <-- Fine, this is what I want
[bash-4.2.10] # foo :this-is-a-long-word<TAB>
[bash-4.2.10] # foo :this-i  <-- Bug here?

-- 
-Clark


reply via email to

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