Replace "generate" to "complete" in functions

This commit is contained in:
EmilySeville7cfg
2022-01-24 15:51:09 +10:00
committed by ridiculousfish
parent f047ef4ea2
commit c5a8e700bb
8 changed files with 46 additions and 46 deletions

View File

@@ -1,4 +1,4 @@
function __attrib_generate_args --description 'Function to generate args' function __attrib_complete_args --description 'Function to generate args'
set --local current_token (commandline --current-token --cut-at-cursor) set --local current_token (commandline --current-token --cut-at-cursor)
switch $current_token switch $current_token
@@ -27,4 +27,4 @@ i\tClear the Not Content Indexed file attribute' | awk -F '\t' "{ printf \"$curr
end end
end end
complete --command attrib --no-files --arguments '(__attrib_generate_args)' complete --command attrib --no-files --arguments '(__attrib_complete_args)'

View File

@@ -1,4 +1,4 @@
function __attributes_disk_generate_args function __attributes_disk_complete_args
if not __fish_seen_subcommand_from set clear if not __fish_seen_subcommand_from set clear
echo -e 'set\tSet the specified attribute of the disk with focus echo -e 'set\tSet the specified attribute of the disk with focus
clear\tClear the specified attribute of the disk with focus' clear\tClear the specified attribute of the disk with focus'
@@ -9,7 +9,7 @@ clear\tClear the specified attribute of the disk with focus'
noerr\tWhen an error is encountered, DiskPart continues to process commands' noerr\tWhen an error is encountered, DiskPart continues to process commands'
end end
function __attributes_volume_generate_args function __attributes_volume_complete_args
if not __fish_seen_subcommand_from set clear if not __fish_seen_subcommand_from set clear
echo -e 'set\tSet the specified attribute of the volume with focus echo -e 'set\tSet the specified attribute of the volume with focus
clear\tClear the specified attribute of the volume with focus' clear\tClear the specified attribute of the volume with focus'
@@ -23,7 +23,7 @@ shadowcopy\tSpecify that the volume is a shadow copy volume
noerr\tWhen an error is encountered, DiskPart continues to process commands' noerr\tWhen an error is encountered, DiskPart continues to process commands'
end end
function __attributes_generate_args --description 'Function to generate args' function __attributes_complete_args --description 'Function to generate args'
if not __fish_seen_subcommand_from disk volume if not __fish_seen_subcommand_from disk volume
echo -e 'disk\tDisplay, set, or clear the attributes of a disk echo -e 'disk\tDisplay, set, or clear the attributes of a disk
volume\tDisplay, set, or clear the attributes of a volume' volume\tDisplay, set, or clear the attributes of a volume'
@@ -31,10 +31,10 @@ volume\tDisplay, set, or clear the attributes of a volume'
end end
if __fish_seen_subcommand_from disk if __fish_seen_subcommand_from disk
__attributes_disk_generate_args __attributes_disk_complete_args
else if __fish_seen_subcommand_from volume else if __fish_seen_subcommand_from volume
__attributes_volume_generate_args __attributes_volume_complete_args
end end
end end
complete --command attributes --no-files --arguments '(__attributes_generate_args)' complete --command attributes --no-files --arguments '(__attributes_complete_args)'

View File

@@ -1,4 +1,4 @@
function __cleanmgr_generate_args --description 'Function to generate args' function __cleanmgr_complete_args --description 'Function to generate args'
set --local previous_token (commandline --tokenize --cut-at-cursor)[-1] set --local previous_token (commandline --tokenize --cut-at-cursor)[-1]
if test "$previous_token" = '/d' if test "$previous_token" = '/d'
@@ -15,4 +15,4 @@ function __cleanmgr_generate_args --description 'Function to generate args'
/?\tShow help' /?\tShow help'
end end
complete --command cleanmgr --no-files --arguments '(__cleanmgr_generate_args)' complete --command cleanmgr --no-files --arguments '(__cleanmgr_complete_args)'

View File

@@ -1,4 +1,4 @@
function __cmd_generate_args --description 'Function to generate args' function __cmd_complete_args --description 'Function to generate args'
set --local current_token (commandline --current-token --cut-at-cursor) set --local current_token (commandline --current-token --cut-at-cursor)
switch $current_token switch $current_token
@@ -47,4 +47,4 @@ off\tDisable delayed environment variable expansion' | awk -F '\t' "{ printf \"$
end end
end end
complete --command cmd --no-files --arguments '(__cmd_generate_args)' complete --command cmd --no-files --arguments '(__cmd_complete_args)'

View File

@@ -1,4 +1,4 @@
function __cmdkey_generate_args --description 'Function to generate args' function __cmdkey_complete_args --description 'Function to generate args'
set --local current_token (commandline --current-token --cut-at-cursor) set --local current_token (commandline --current-token --cut-at-cursor)
set --local previous_token (commandline --tokenize --cut-at-cursor)[-1] set --local previous_token (commandline --tokenize --cut-at-cursor)[-1]
@@ -31,4 +31,4 @@ function __cmdkey_generate_args --description 'Function to generate args'
end end
end end
complete --command cmdkey --no-files --arguments '(__cmdkey_generate_args)' complete --command cmdkey --no-files --arguments '(__cmdkey_complete_args)'

View File

@@ -1,4 +1,4 @@
function __reg_add_generate_args --argument-names previous_token function __reg_add_complete_args --argument-names previous_token
if test "$previous_token" = '/t' if test "$previous_token" = '/t'
echo 'REG_SZ echo 'REG_SZ
REG_MULTI_SZ REG_MULTI_SZ
@@ -24,7 +24,7 @@ REG_EXPAND_SZ'
/?\tShow help' /?\tShow help'
end end
function __reg_compare_generate_args --argument-names previous_token function __reg_compare_complete_args --argument-names previous_token
if not __fish_seen_argument --windows 'v' --windows 've' if not __fish_seen_argument --windows 'v' --windows 've'
echo -e '/v\tSpecify the value name echo -e '/v\tSpecify the value name
/ve\tSpecify that only entries that have a value name of null should be compared' /ve\tSpecify that only entries that have a value name of null should be compared'
@@ -41,13 +41,13 @@ function __reg_compare_generate_args --argument-names previous_token
/?\tShow help' /?\tShow help'
end end
function __reg_copy_generate_args --argument-names previous_token function __reg_copy_complete_args --argument-names previous_token
echo -e '/s\tCopy all subkeys and entries under the specified subkey echo -e '/s\tCopy all subkeys and entries under the specified subkey
/f\tCopy the subkey without prompting for confirmation /f\tCopy the subkey without prompting for confirmation
/?\tShow help' /?\tShow help'
end end
function __reg_delete_generate_args --argument-names previous_token function __reg_delete_complete_args --argument-names previous_token
if not __fish_seen_argument --windows 'v' --windows 've' --windows 'va' if not __fish_seen_argument --windows 'v' --windows 've' --windows 'va'
echo -e '/v\tDelete a specific entry under the subkey echo -e '/v\tDelete a specific entry under the subkey
/ve\tSpecify that only entries that have no value will be deleted /ve\tSpecify that only entries that have no value will be deleted
@@ -58,12 +58,12 @@ function __reg_delete_generate_args --argument-names previous_token
/?\tShow help' /?\tShow help'
end end
function __reg_export_generate_args --argument-names previous_token function __reg_export_complete_args --argument-names previous_token
echo -e '/y\tOverwrite any existing file with the name filename without prompting for confirmation echo -e '/y\tOverwrite any existing file with the name filename without prompting for confirmation
/?\tShow help' /?\tShow help'
end end
function __reg_query_generate_args --argument-names previous_token function __reg_query_complete_args --argument-names previous_token
if test "$previous_token" = '/t' if test "$previous_token" = '/t'
echo 'REG_SZ echo 'REG_SZ
REG_MULTI_SZ REG_MULTI_SZ
@@ -93,12 +93,12 @@ REG_NONE'
/?\tShow help' /?\tShow help'
end end
function __reg_save_generate_args --argument-names previous_token function __reg_save_complete_args --argument-names previous_token
echo -e '/y\tOverwrite an existing file with the name filename without prompting for confirmation echo -e '/y\tOverwrite an existing file with the name filename without prompting for confirmation
/?\tShow help' /?\tShow help'
end end
function __reg_generate_args --description 'Function to generate args' function __reg_complete_args --description 'Function to generate args'
if not __fish_seen_subcommand_from add compare copy delete export import load query restore save unload if not __fish_seen_subcommand_from add compare copy delete export import load query restore save unload
echo -e 'add\tAdd a new subkey or entry echo -e 'add\tAdd a new subkey or entry
compare\tCompare specified registry subkeys or entries compare\tCompare specified registry subkeys or entries
@@ -117,20 +117,20 @@ unload\tRemove a section of the registry that was loaded using the reg load oper
set --local previous_token (commandline --tokenize --cut-at-cursor)[-1] set --local previous_token (commandline --tokenize --cut-at-cursor)[-1]
if __fish_seen_subcommand_from add if __fish_seen_subcommand_from add
__reg_add_generate_args __reg_add_complete_args
else if __fish_seen_subcommand_from compare else if __fish_seen_subcommand_from compare
__reg_compare_generate_args __reg_compare_complete_args
else if __fish_seen_subcommand_from copy else if __fish_seen_subcommand_from copy
__reg_copy_generate_args __reg_copy_complete_args
else if __fish_seen_subcommand_from delete else if __fish_seen_subcommand_from delete
__reg_delete_generate_args __reg_delete_complete_args
else if __fish_seen_subcommand_from export else if __fish_seen_subcommand_from export
__reg_export_generate_args __reg_export_complete_args
else if __fish_seen_subcommand_from query else if __fish_seen_subcommand_from query
__reg_query_generate_args __reg_query_complete_args
else if __fish_seen_subcommand_from save else if __fish_seen_subcommand_from save
__reg_save_generate_args __reg_save_complete_args
end end
end end
complete --command reg --no-files --arguments '(__reg_generate_args)' complete --command reg --no-files --arguments '(__reg_complete_args)'

View File

@@ -2,7 +2,7 @@ function __schtasks_list_tasks --description 'Helper function to list tasks'
schtasks /query /fo csv /nh | awk -F ',' '{ print $1 }' schtasks /query /fo csv /nh | awk -F ',' '{ print $1 }'
end end
function __schtasks_change_generate_args --argument-names previous_token function __schtasks_change_complete_args --argument-names previous_token
if test "$previous_token" = '/tn' if test "$previous_token" = '/tn'
__schtasks_list_tasks __schtasks_list_tasks
return return
@@ -46,7 +46,7 @@ function __schtasks_change_generate_args --argument-names previous_token
/?\tShow help' /?\tShow help'
end end
function __schtasks_create_generate_args --argument-names previous_token function __schtasks_create_complete_args --argument-names previous_token
if test "$previous_token" = '/sc' if test "$previous_token" = '/sc'
echo -e 'MINUTE\tSpecify the number of minutes before the task should run echo -e 'MINUTE\tSpecify the number of minutes before the task should run
HOURLY\tSpecify the number of hours before the task should run HOURLY\tSpecify the number of hours before the task should run
@@ -112,7 +112,7 @@ ONIDLE\tSpecify that the task runs after the system is idle for the number of mi
/?\tShow help' /?\tShow help'
end end
function __schtasks_delete_generate_args --argument-names previous_token function __schtasks_delete_complete_args --argument-names previous_token
if test "$previous_token" = '/tn' if test "$previous_token" = '/tn'
__schtasks_list_tasks __schtasks_list_tasks
return return
@@ -137,7 +137,7 @@ function __schtasks_delete_generate_args --argument-names previous_token
/?\tShow help' /?\tShow help'
end end
function __schtasks_end_generate_args --argument-names previous_token function __schtasks_end_complete_args --argument-names previous_token
if test "$previous_token" = '/tn' if test "$previous_token" = '/tn'
__schtasks_list_tasks __schtasks_list_tasks
return return
@@ -161,7 +161,7 @@ function __schtasks_end_generate_args --argument-names previous_token
/?\tShow help' /?\tShow help'
end end
function __schtasks_query_generate_args --argument-names previous_token function __schtasks_query_complete_args --argument-names previous_token
if test "$previous_token" = '/fo' if test "$previous_token" = '/fo'
echo -e 'TABLE echo -e 'TABLE
LIST LIST
@@ -189,7 +189,7 @@ CSV'
/?\tShow help' /?\tShow help'
end end
function __schtasks_run_generate_args --argument-names previous_token function __schtasks_run_complete_args --argument-names previous_token
if test "$previous_token" = '/tn' if test "$previous_token" = '/tn'
__schtasks_list_tasks __schtasks_list_tasks
return return
@@ -213,7 +213,7 @@ function __schtasks_run_generate_args --argument-names previous_token
/?\tShow help' /?\tShow help'
end end
function __schtasks_generate_args --description 'Function to generate args' function __schtasks_complete_args --description 'Function to generate args'
if not __fish_seen_argument --windows change --windows create --windows delete --windows end \ if not __fish_seen_argument --windows change --windows create --windows delete --windows end \
--windows query --windows run --windows query --windows run
echo -e '/change\tChange one or more properties of a task echo -e '/change\tChange one or more properties of a task
@@ -228,18 +228,18 @@ function __schtasks_generate_args --description 'Function to generate args'
set --local previous_token (commandline --tokenize --cut-at-cursor)[-1] set --local previous_token (commandline --tokenize --cut-at-cursor)[-1]
if __fish_seen_argument --windows change if __fish_seen_argument --windows change
__schtasks_change_generate_args "$previous_token" __schtasks_change_complete_args "$previous_token"
else if __fish_seen_argument --windows create else if __fish_seen_argument --windows create
__schtasks_create_generate_args "$previous_token" __schtasks_create_complete_args "$previous_token"
else if __fish_seen_argument --windows delete else if __fish_seen_argument --windows delete
__schtasks_delete_generate_args "$previous_token" __schtasks_delete_complete_args "$previous_token"
else if __fish_seen_argument --windows end else if __fish_seen_argument --windows end
__schtasks_end_generate_args "$previous_token" __schtasks_end_complete_args "$previous_token"
else if __fish_seen_argument --windows query else if __fish_seen_argument --windows query
__schtasks_query_generate_args "$previous_token" __schtasks_query_complete_args "$previous_token"
else if __fish_seen_argument --windows run else if __fish_seen_argument --windows run
__schtasks_run_generate_args "$previous_token" __schtasks_run_complete_args "$previous_token"
end end
end end
complete --command schtasks --no-files --arguments '(__schtasks_generate_args)' complete --command schtasks --no-files --arguments '(__schtasks_complete_args)'

View File

@@ -1,4 +1,4 @@
function __setx_generate_args --description 'Function to generate args' function __setx_complete_args --description 'Function to generate args'
set --local previous_token (commandline --tokenize --cut-at-cursor)[-1] set --local previous_token (commandline --tokenize --cut-at-cursor)[-1]
if test "$previous_token" = '/u' if test "$previous_token" = '/u'
@@ -31,4 +31,4 @@ function __setx_generate_args --description 'Function to generate args'
/?\tShow help' /?\tShow help'
end end
complete --command setx --no-files --arguments '(__setx_generate_args)' complete --command setx --no-files --arguments '(__setx_complete_args)'