From 7d055a120e6fa52cf34750b524ff7d06cd3ea5f8 Mon Sep 17 00:00:00 2001 From: Tony Wang Date: Wed, 29 Nov 2017 09:21:00 +0800 Subject: [PATCH] fix patch completion patch -i should be followed by a filename, and patch -d should be followed by a directory --- share/completions/patch.fish | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/completions/patch.fish b/share/completions/patch.fish index 50f6bc168..be71824ad 100644 --- a/share/completions/patch.fish +++ b/share/completions/patch.fish @@ -8,7 +8,7 @@ complete -c patch -l no-backup-if-mismatch -d "Do not back up a file if the patc complete -c patch -s B -l prefix -r -f -d "Prefix pref to a file name when generating its simple backup file name" complete -c patch -l binary -d "Read and write all files in binary mode" complete -c patch -s c -l context -d "Interpret the patch file as a ordinary context diff" -complete -c patch -s d -l directory -r -f -d "Change to the directory dir immediately" +complete -c patch -s d -l directory -xa '(__fish_complete_directories (commandline -ct))' -d "Change to the directory dir immediately" complete -c patch -s D -l ifdef -r -f -d "Use the #ifdef…#endif construct to mark changes" complete -c patch -l dry-run -d "Print the results of applying the patches without actually changing any files" complete -c patch -s e -l ed -d "Interpret the patch file as an ed script" @@ -17,15 +17,15 @@ complete -c patch -s f -l force -d "Assume that the user knows exactly what he/s complete -c patch -s F -l fuzz -r -f -d "Set the maximum fuzz factor" complete -c patch -s g -l get -r -f -d "This option controls patch's actions when a file is under RCS or SCCS control, and does not exist or is read-only and matches the default version, or when a file is under ClearCase control and does not exist" complete -c patch -l help -d "Display help and exit" -complete -c patch -s i -l input -r -f -d "Read the patch from patchfile" +complete -c patch -s i -l input -r -d "Read the patch from patchfile" complete -c patch -s l -l ignore-whitespace -d "Match patterns loosely, in case tabs or spaces have been munged in your files" complete -c patch -s n -l normal -d "Interpret the patch file as a normal diff" complete -c patch -s N -l forward -d "Ignore patches that seem to be reversed or already applied" -complete -c patch -s o -l output -r -f -d "Send output to outfile instead of patching files in place" +complete -c patch -s o -l output -r -d "Send output to outfile instead of patching files in place" complete -c patch -s p -l strip -r -f -d "Strip the smallest prefix containing num leading slashes from each file name found in the patch file" complete -c patch -l posix -d "Conform more strictly to the POSIX standard" complete -c patch -l quoting-style -r -f -d "Use style word to quote output names" -a "literal shell shell-always c escape" -complete -c patch -s r -l reject-file -r -f -d "Put rejects into rejectfile instead of the default .rej file" +complete -c patch -s r -l reject-file -r -d "Put rejects into rejectfile instead of the default .rej file" complete -c patch -s R -l reverse -d "Assume that this patch was created with the old and new files swapped" complete -c patch -s s -l silent -l quiet -d "Work silently, unless an error occurs" complete -c patch -s t -l batch -d "Suppress questions like -f, but make some different assumptions"