zcsf: fix bash completion on -

This commit is contained in:
zawz 2020-05-03 17:11:27 +02:00
parent c7330f60f0
commit a9992d2877

View file

@ -9,7 +9,7 @@ _zcsf_completion()
if [ "$COMP_CWORD" = "1" ] ; then # operations if [ "$COMP_CWORD" = "1" ] ; then # operations
_compwords=$_cw1 _compwords=$_cw1
elif [ "$COMP_CWORD" -gt "1" ] && echo "$_cw1_ls" | grep -qw "${COMP_WORDS[1]}" ; then # src files elif [ "$COMP_CWORD" -gt "1" ] && echo "$_cw1_ls" | grep -qw -- "${COMP_WORDS[1]}"; then # src files
_compwords=$(zcsf ls 2>/dev/null) _compwords=$(zcsf ls 2>/dev/null)
elif [ "$COMP_CWORD" = "2" ] && [ "${COMP_WORDS[1]}" = "make" ] ; then # make type elif [ "$COMP_CWORD" = "2" ] && [ "${COMP_WORDS[1]}" = "make" ] ; then # make type
_compwords=$_make_types _compwords=$_make_types