mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
Better /u, /p support for setx command
This commit is contained in:
parent
ae95c072c9
commit
e137df393a
1 changed files with 12 additions and 0 deletions
|
@ -1,4 +1,16 @@
|
||||||
function __setx_generate_args --description 'Function to generate args'
|
function __setx_generate_args --description 'Function to generate args'
|
||||||
|
set --local previous_token (commandline --tokenize --cut-at-cursor)[-1]
|
||||||
|
|
||||||
|
if test "$previous_token" = '/u'
|
||||||
|
wmic UserAccount get Name | sed --quiet '1b;/./p'
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if test "$previous_token" = '/p'
|
||||||
|
__fish_generate_password
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
echo -e '/u\tSpecify the name or IP address of a remote computer
|
echo -e '/u\tSpecify the name or IP address of a remote computer
|
||||||
/p\tSpecify the password of the user account that is specified in the /u parameter
|
/p\tSpecify the password of the user account that is specified in the /u parameter
|
||||||
/f\tSpecify the file that you want to use
|
/f\tSpecify the file that you want to use
|
||||||
|
|
Loading…
Reference in a new issue