]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/whereis
su: use lib/pty-session.c code for --pty
[thirdparty/util-linux.git] / bash-completion / whereis
CommitLineData
76dceb10
SK
1_whereis_module()
2{
3 local cur prev OPTS
4 COMPREPLY=()
5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
7 case $prev in
8 '-B'|'-M'|'-S')
ce3e6b15 9 local IFS=$'\n'
76dceb10
SK
10 compopt -o filenames
11 COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
12 return 0
13 ;;
d4f9b8d7
VS
14 '-h'|'-V')
15 return 0
16 ;;
76dceb10
SK
17 esac
18 case $cur in
19 -*)
20 OPTS="-b -B -m -M -s -S -f -u -l"
21 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
22 return 0
23 ;;
24 esac
25 COMPREPLY=( $(compgen -W "file" -- $cur) )
26 return 0
27}
28complete -F _whereis_module whereis