From d7c62fa7d1e30100db6038d2373ee7d954354583 Mon Sep 17 00:00:00 2001 From: Emily Grace Seville Date: Sat, 27 Nov 2021 20:06:08 +1000 Subject: [PATCH] pabcnetcclear command completion update (#8480) * Rename pabcnetcclear complete * Code clean-up * Debug values support * Change /Debug description * Standardize help * Use single quotes for --arguments --- share/completions/pabcnet_clear.fish | 1 - share/completions/pabcnetcclear.fish | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) delete mode 100644 share/completions/pabcnet_clear.fish create mode 100644 share/completions/pabcnetcclear.fish diff --git a/share/completions/pabcnet_clear.fish b/share/completions/pabcnet_clear.fish deleted file mode 100644 index 408b31c26..000000000 --- a/share/completions/pabcnet_clear.fish +++ /dev/null @@ -1 +0,0 @@ -complete -f -c pabcnet_clear -a '/Help\t"Display help" /H\t"Display help" /\?\t"Display help" /Debug\t"Generate code with optimizations" /output\t"Executable name" /SearchDir\t"Add path to unit search directories"' diff --git a/share/completions/pabcnetcclear.fish b/share/completions/pabcnetcclear.fish new file mode 100644 index 000000000..73caa9276 --- /dev/null +++ b/share/completions/pabcnetcclear.fish @@ -0,0 +1,17 @@ +function __pabcnetcclear_generate_args --description 'Function to generate args' + set --local current_token (commandline --current-token --cut-at-cursor) + switch $current_token + case '/Debug:*' + echo -e $current_token"0\tEnable generation +$current_token"1"\tDisable generation" + case '*' + echo -e "/Help\tShow help +/H\tShow help +/?\tShow help +/Debug\tGenerate a code debug info +/output\tSpecify an executable name +/SearchDir\tSpecify a path to search units" + end +end + +complete --command pabcnetcclear --no-files --arguments '(__pabcnetcclear_generate_args)'