Quote _filedir arguments when appropriate to prevent failglob failures

This commit is contained in:
Igor Murzov 2014-06-05 00:42:11 +04:00
parent 24c8f1e44e
commit 8566a5a896
6 changed files with 6 additions and 6 deletions

View File

@ -81,7 +81,7 @@ _cppcheck()
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace [[ $COMPREPLY == *= ]] && compopt -o nospace
else else
_filedir @([cht]pp|[cht]xx|cc|[ch]++|[ch]) _filedir '@([cht]pp|[cht]xx|cc|[ch]++|[ch])'
fi fi
} && } &&
complete -F _cppcheck cppcheck complete -F _cppcheck cppcheck

View File

@ -26,7 +26,7 @@ _installpkg()
return 0 return 0
fi fi
_filedir "t[bglx]z" _filedir 't[bglx]z'
} && complete -F _installpkg installpkg } && complete -F _installpkg installpkg
# ex: ts=4 sw=4 et filetype=sh # ex: ts=4 sw=4 et filetype=sh

View File

@ -23,7 +23,7 @@ _k3b()
return 0 return 0
;; ;;
--cdimage|--image) --cdimage|--image)
_filedir @(cue|iso|toc) _filedir '@(cue|iso|toc)'
return 0 return 0
;; ;;
--dvdimage) --dvdimage)

View File

@ -22,7 +22,7 @@ _sqlite3()
return 0 return 0
fi fi
_filedir $dbexts _filedir "$dbexts"
} && } &&
complete -F _sqlite3 sqlite3 complete -F _sqlite3 sqlite3

View File

@ -27,7 +27,7 @@ _tar()
*[jy]*) ext='t@(?(ar.)bz?(2)|b2)' ;; *[jy]*) ext='t@(?(ar.)bz?(2)|b2)' ;;
*J*) ext='t?(ar.)xz' ;; *J*) ext='t?(ar.)xz' ;;
esac esac
_filedir $ext _filedir "$ext"
else else
_filedir _filedir
fi fi

View File

@ -23,7 +23,7 @@ _upgradepkg()
return return
fi fi
_filedir "t[bglx]z" _filedir 't[bglx]z'
} && complete -F _upgradepkg upgradepkg } && complete -F _upgradepkg upgradepkg
# ex: ts=4 sw=4 et filetype=sh # ex: ts=4 sw=4 et filetype=sh