# patool completion have patool && _patool() { local cur prev COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} if type _argcomplete &> /dev/null; then _argcomplete "$@" else _filedir fi return 0 } complete -F _patool $filenames patool