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.
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers