fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes Altmanninger__fish_complete_list: strip "--foo=" prefix from replacing completions320ebb685

master
1.1 KiB17 linesraw
1function __fish_complete_su_env_whitelist
2    env | string match -v -e -r '^(?:HOME|SHELL|USER|LOGNAME|PATH)=' | string replace -r '([^=]+)=(.*)' '$1\t$2'
3end
4
5complete -c su -x -a "(__fish_complete_users)"
6
7complete -c su -s l -l login -d "Make login shell"
8complete -c su -s c -l command -d "Pass command to shell" -xa "(complete -C '')"
9complete -c su -s f -l fast -d "Pass -f to the shell"
10complete -c su -s g -l group -x -a "(__fish_complete_groups)" -d "Specify the primary group"
11complete -c su -s G -l supp-group -x -a "(__fish_complete_groups)" -d "Specify a supplemental group"
12complete -c su -s m -s p -l preserve_environment -d "Preserve environment"
13complete -c su -s P -l pty -d "Create pseudo-terminal for the session"
14complete -c su -s s -l shell -x -a "(cat /etc/shells)" -d "Run the specified shell"
15complete -c su -s w -l whitelist-environment -x -a "(__fish_stripprefix='^(--whitelist-environment=|-\w*w)' __fish_complete_list , __fish_complete_su_env_whitelist)" -d "Don't reset these environment variables"
16complete -c su -s h -l help -d "Display help and exit"
17complete -c su -s V -l version -d "Display version and exit"