From 1cd0726913258340857618fba753bdee0bb173c1 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Fri, 26 Nov 2021 19:29:54 +1000 Subject: [PATCH] Clean-up md/rd completions: - use __fish_list_windows_drives - hide dependent options --- share/completions/md.fish | 2 +- share/functions/rd.fish | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/share/completions/md.fish b/share/completions/md.fish index 959517f27..fb14ab057 100644 --- a/share/completions/md.fish +++ b/share/completions/md.fish @@ -4,7 +4,7 @@ function __md_generate_args --description 'Function to generate args' case '/*' echo -e '/?\tShow help' case '*' - wmic logicaldisk get name | tail --lines +2 + __fish_list_windows_drives end end diff --git a/share/functions/rd.fish b/share/functions/rd.fish index 2abc8d5ea..a4e0dd92c 100644 --- a/share/functions/rd.fish +++ b/share/functions/rd.fish @@ -2,11 +2,14 @@ function __rd_generate_args --description 'Function to generate args' set --local current_token (commandline --current-token --cut-at-cursor) switch $current_token case '/*' + if __fish_seen_argument --windows 's' + echo -e '/q\tSpecify quiet mode' + end + echo -e '/s\tDelete a directory tree -/q\tSpecify quiet mode /?\tShow help' case '*' - wmic logicaldisk get name | tail --lines +2 + __fish_list_windows_drives end end