fish-shell/share/completions/su.fish
Johannes Altmanninger 36693e4391 Complete empty subcomands consistently
If the command is empty, try to complete starting from the empty command
instead of the whole commandline.
2019-11-05 09:05:46 +01:00

13 lines
551 B
Fish

# Completions for su
complete -x -c su -a "(__fish_complete_users)"
complete -c su -s l -l login -d "Make login shell"
complete -c su -s c -l command -d "Pass command to shell" -xa "(__fish_complete_external_command)"
complete -c su -s f -l fast -d "Pass -f to the shell"
complete -c su -s m -l preserve_environment -d "Preserve environment"
complete -c su -s p -d "Preserve environment"
complete -x -c su -s s -l shell -a "(cat /etc/shells)"
complete -c su -l help -d "Display help and exit"
complete -c su -l version -d "Display version and exit"