2022-01-24 18:10:56 +08:00
|
|
|
function __setx_complete_args -d 'Function to generate args'
|
2024-01-22 14:42:45 +08:00
|
|
|
set -l previous_token (commandline -xc)[-1]
|
2021-11-26 08:04:20 +08:00
|
|
|
|
2022-01-27 14:02:23 +08:00
|
|
|
if test "$previous_token" = /u
|
|
|
|
__fish_print_windows_users
|
|
|
|
return
|
|
|
|
end
|
2022-01-24 18:10:56 +08:00
|
|
|
end
|
2021-11-26 08:04:20 +08:00
|
|
|
|
2022-01-24 18:10:56 +08:00
|
|
|
complete -c setx -f -a '(__setx_complete_args)'
|
2021-11-26 17:00:59 +08:00
|
|
|
|
2022-01-24 18:10:56 +08:00
|
|
|
complete -c setx -f -n '__fish_seen_argument -w s' -a /u \
|
|
|
|
-d 'Run the script with the credentials of the specified user account'
|
|
|
|
complete -c setx -f -n '__fish_seen_argument -w u' -a /p \
|
|
|
|
-d 'Specify the password of the user account that is specified in the /u parameter'
|
2021-11-26 17:00:59 +08:00
|
|
|
|
2022-01-24 18:10:56 +08:00
|
|
|
complete -c setx -f -n 'not __fish_seen_argument -w a -w r -w x' -a /a \
|
|
|
|
-d 'Specify absolute coordinates and offset as search parameters'
|
|
|
|
complete -c setx -f -n 'not __fish_seen_argument -w a -w r -w x' -a /r \
|
|
|
|
-d 'Specify relative coordinates and offset'
|
|
|
|
complete -c setx -f -n 'not __fish_seen_argument -w a -w r -w x' -a /x \
|
|
|
|
-d 'Display file coordinates, ignoring the /a, /r, and /d command-line options'
|
2021-11-26 16:36:14 +08:00
|
|
|
|
2022-01-24 18:10:56 +08:00
|
|
|
complete -c setx -f -n '__fish_seen_argument -w a -w r' -a /m \
|
|
|
|
-d 'Specify to set the variable in the system environment'
|
2021-11-25 17:46:22 +08:00
|
|
|
|
2022-01-24 18:10:56 +08:00
|
|
|
complete -c setx -f -a /s -d 'Specify the name or IP address of a remote computer'
|
|
|
|
complete -c setx -f -a /k \
|
|
|
|
-d 'Specify that the variable is set based on information from a registry key'
|
|
|
|
complete -c setx -f -a /f -d 'Specify the file that you want to use'
|
|
|
|
complete -c setx -f -a /d -d 'Specify delimiters to be used'
|
|
|
|
complete -c setx -f -a '/?' -d 'Show help'
|