2022-01-24 13:51:09 +08:00
|
|
|
function __setx_complete_args --description 'Function to generate args'
|
2021-11-26 08:04:20 +08:00
|
|
|
set --local previous_token (commandline --tokenize --cut-at-cursor)[-1]
|
|
|
|
|
|
|
|
if test "$previous_token" = '/u'
|
2021-11-26 16:36:14 +08:00
|
|
|
__fish_list_windows_users
|
2021-11-26 08:04:20 +08:00
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2021-11-26 17:00:59 +08:00
|
|
|
if __fish_seen_argument --windows 's'
|
|
|
|
echo -e '/u\tRun the script with the credentials of the specified user account'
|
|
|
|
end
|
|
|
|
|
|
|
|
if __fish_seen_argument --windows 'u'
|
|
|
|
echo -e '/p\tSpecify the password of the user account that is specified in the /u parameter'
|
|
|
|
end
|
|
|
|
|
2021-11-26 16:36:14 +08:00
|
|
|
if not __fish_seen_argument --windows 'a' --windows 'r' --windows 'x'
|
|
|
|
echo -e '/a\tSpecify absolute coordinates and offset as search parameters
|
2021-12-16 06:03:02 +08:00
|
|
|
/r\tSpecify relative coordinates and offset
|
2021-11-26 16:36:14 +08:00
|
|
|
/x\tDisplay file coordinates, ignoring the /a, /r, and /d command-line options'
|
2021-12-16 06:03:02 +08:00
|
|
|
end
|
2021-11-26 16:36:14 +08:00
|
|
|
|
|
|
|
if __fish_seen_argument --windows 'a' --windows 'r'
|
|
|
|
echo -e '/m\tSpecify to set the variable in the system environment'
|
2021-11-26 08:04:20 +08:00
|
|
|
end
|
|
|
|
|
2021-11-26 16:36:14 +08:00
|
|
|
echo -e '/s\tSpecify the name or IP address of a remote computer
|
|
|
|
/k\tSpecify that the variable is set based on information from a registry key
|
2021-11-25 17:46:22 +08:00
|
|
|
/f\tSpecify the file that you want to use
|
2021-12-16 06:03:02 +08:00
|
|
|
/d\tSpecify delimiters to be used
|
2021-11-25 17:46:22 +08:00
|
|
|
/?\tShow help'
|
|
|
|
end
|
|
|
|
|
2022-01-24 13:51:09 +08:00
|
|
|
complete --command setx --no-files --arguments '(__setx_complete_args)'
|