[Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-349-ga0834d3
Ville Skyttä
ville.skytta at iki.fi
Wed Jun 8 18:54:31 UTC 2011
On 06/08/2011 02:58 AM, Igor Murzov wrote:
> if [[ "$cur" == -* ]]; then
> COMPREPLY=( $( compgen -W '--warn --root' -- "$cur") )
> - return
> + [[ ${#COMPREPLY[@]} -gt 0 ]] && return
> fi
>
> _filedir "t[bglx]z"
> } && complete -F _installpkg installpkg
>
> This way this function will allow to complete an awful file name like "--
> xo.txz". Is that good thing to do?
I see no problems with that offhand. The condition could be simplified
a bit though: [[ $COMPREPLY ]] && return
More information about the Bash-completion-devel
mailing list