nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] Request For New Feature: Unadorned Plus Sign


From: Ralph Corderoy
Subject: Re: [Nmh-workers] Request For New Feature: Unadorned Plus Sign
Date: Sat, 11 Feb 2012 12:18:43 +0000

Stop the press!

>     complete -P + -F comp_nmh_folder -D

This stops the normal /etc/pass<tab> completion working, now only
+folder works.  The fix seems to be adding -o options so it falls back
when comp_nmh_folder() doesn't come up with any possibilities.
`bashdefault' makes $HOM<tab> complete and `default' has readline(3) do
/etc/pass<tab> AFAICT;  bash(1) is vague.

So, together with Jon's fix that makes it

    comp_nmh_folder() 
    { 
        local w=${COMP_WORDS[COMP_CWORD]} &&
        [[ $w == +* ]] && w=${w#+} &&
        COMPREPLY=($(
            folders -recurse -fast |
            awk -v "w=$w" -v "l=${#w}" 'substr($0, 1, l) == w'
        ))
    }
    complete -P + -F comp_nmh_folder -D -o bashdefault -o default

Cheers, Ralph.



reply via email to

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