fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
244e9586c
master
1# 2# Completions for the chsh command 3# 4 5# This grep tries to match nonempty lines that do not start with hash 6complete -c chsh -s s -l shell -x -a"(string match -r '^[^#].*' < /etc/shells)" -d"Specify your login shell" 7complete -c chsh -s u -l help -d"Display help and exit" 8complete -c chsh -s v -l version -d"Display version and exit" 9complete -x -c chsh -a"(__fish_complete_users)" 10 11# util-linux's chsh also has a "-l"/"--list-shells" option. 12# While both FreeBSD and macOS also have "-l", it means something different and probably uninteresting. 13if set -l chshversion( chsh --version2> /dev/null) ;and string match -qr'.*util-linux.*' --$chshversion 14complete -f -c chsh -s l -l list-shells -d"List available shells and exit" 15end