fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
a9618477e
master
1function __cmdkey_complete_args -d'Function to generate args' 2set -l current_token( commandline -tc) 3set -l previous_token( commandline -xc)[ -1 ] 4 5switch $current_token 6case '/user:*' 7__fish_print_windows_users | awk "{ printf \"%s%s\n\", \" $current_token \", \$0 }" 8case '*' 9if test " $previous_token " = /delete 10echo -e'/ras\tDelete remote access entry' 11return 12end 13end 14end 15 16complete -c cmdkey -f -a'(__cmdkey_complete_args)' 17 18complete -c cmdkey -f -n"not __fish_seen_argument -w add: -w generic:" -a /add:\ 19 -d'Add a user name and password' 20complete -c cmdkey -f -n"not __fish_seen_argument -w add: -w generic:" -a /generic:\ 21 -d'Add generic credentials' 22 23complete -c cmdkey -f -n"not __fish_seen_argument -w smartcard -w user:" -a /smartcard\ 24 -d'Retrieve the credential' 25complete -c cmdkey -f -n"not __fish_seen_argument -w smartcard -w user:" -a /user:\ 26 -d'Specify the user or account name' 27 28complete -c cmdkey -f -n"__fish_seen_argument -w user:" -a /pass: -d'Specify the password' 29 30complete -c cmdkey -f -a /delete: -d'Specify the user or account name' 31complete -c cmdkey -f -a /delete -d'Specify the user or account name' 32 33complete -c cmdkey -f -a /list: -d'Display the list of stored user names and credentials' 34complete -c cmdkey -f -a'/?' -d'Show help'