colorls/lib/tab_complete.sh
Claudio Bley 96ec0d5276 Generate Zsh completion file
Add the `_colorls` completion file to the `zsh/` folder of the gem and make the
`tab_complete.sh` script work for Zsh too.
2017-11-22 22:32:20 +01:00

9 lines
236 B
Bash

if [ -z "${ZSH_VERSION+x}" ]; then
function _colorls_complete() {
COMPREPLY=( $( colorls --'*'-completion-bash="$2" ) )
}
complete -o default -F _colorls_complete colorls
else
fpath=("${0:A:h:h}/zsh" $fpath)
fi