Merge pull request #2599 from unxed/iterm_fix
[far2l.git] / bash-completion / far2l
blob897de91e26cf917a9b6bf474cc93599689b9d42f
1 # bash completion for far2l                                   -*- shell-script -*-
3 _far2l_completions()
5     local cur prev words cword split
6     _init_completion -s || return
8     case $prev in
9         -!(-*)[ev])
10             _filedir
11             return
12             ;;
13     esac
15     $split && return
17     if [[ $cur == -* ]]; then
18         COMPREPLY=($(compgen -W '$(_parse_help "$1" -h)' -- "$cur"))
19         [[ ${COMPREPLY-} == *= ]] && compopt -o nospace
20         [[ ${COMPREPLY-} == *: ]] && compopt -o nospace
21     else
22         _filedir -d
23     fi
24 } &&
25     complete -F _far2l_completions far2l
27 # ex: filetype=sh