From 61a77ef9fc7cbc7a52114ac2b5ad86ceb082f1c2 Mon Sep 17 00:00:00 2001 From: EmilySeville7cfg Date: Fri, 26 Nov 2021 10:25:12 +1000 Subject: [PATCH] Hide /c, /k when needed for cmd command --- share/completions/cmd.fish | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/share/completions/cmd.fish b/share/completions/cmd.fish index 118221185..01d103cb7 100644 --- a/share/completions/cmd.fish +++ b/share/completions/cmd.fish @@ -28,9 +28,12 @@ off\tDisable file and directory name completion' | awk -F '\t' "{ printf \"$curr echo -e 'on\tEnable delayed environment variable expansion off\tDisable delayed environment variable expansion' | awk -F '\t' "{ printf \"$current_token%s\t%s\n\", \$1, \$2 }" case '*' - echo -e '/c\tCarry out the command specified by string and then stop -/k\tCarry out the command specified by string and continue -/s\tModify the treatment of string after /c or /k + if not __fish_seen_argument --windows 'c' --windows 'k' + echo -e '/c\tCarry out the command specified by string and then stop +/k\tCarry out the command specified by string and continue' + end + + echo -e '/s\tModify the treatment of string after /c or /k /q\tTurn the echo off /d\tDisable execution of AutoRun commands /a\tFormat internal command output to a pipe or a file as ANSI