From b7bd7e991671f06dc6dfb8c771bf233ff1e30976 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 8 Aug 2020 22:35:19 +0200 Subject: [PATCH] Clean up some __fish_complete_suffix usage Also don't cd in pine completions. --- share/completions/git.fish | 6 +++--- share/completions/patch.fish | 4 +--- share/completions/pine.fish | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/share/completions/git.fish b/share/completions/git.fish index a5a76e47a..b484c21eb 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -1843,8 +1843,8 @@ complete -f -c git -n '__fish_git_using_command help' -a worktree -d 'Manage mul complete -f -c git -n '__fish_git_using_command config' -l global -d 'Get/set global configuration' complete -f -c git -n '__fish_git_using_command config' -l system -d 'Get/set system configuration' complete -f -c git -n '__fish_git_using_command config' -l local -d 'Get/set local repo configuration' -complete -f -c git -n '__fish_git_using_command config' -s f -l file -d 'Read config from file' -complete -f -c git -n '__fish_git_using_command config' -l blob -d 'Read config from blob' -ra '(__fish_complete_suffix '')' +complete -F -c git -n '__fish_git_using_command config' -s f -l file -d 'Read config from file' -r +complete -F -c git -n '__fish_git_using_command config' -l blob -d 'Read config from blob' -r # If no argument is specified, it's as if --get was used # Use -k with `__fish_git_config_keys` so that user defined valeus are shown first @@ -1875,7 +1875,7 @@ complete -f -c git -n '__fish_git_using_command config' -l show-origin -d 'Show complete -f -c git -n '__fish_git_using_command config; and __fish_seen_argument get' -l default -d 'Use default value when missing entry' complete -c git -n '__fish_prev_arg_in bisect' -xa "help start bad good new old terms skip next reset visualize view replay log run" -complete -c git -n '__fish_git_using_command bisect; and __fish_seen_argument --' -xa "(__fish_complete_suffix)" +complete -c git -n '__fish_git_using_command bisect; and __fish_seen_argument --' -F ## Custom commands (git-* commands installed in the PATH) diff --git a/share/completions/patch.fish b/share/completions/patch.fish index 6f329a155..4fd098c03 100644 --- a/share/completions/patch.fish +++ b/share/completions/patch.fish @@ -17,8 +17,7 @@ complete -c patch -s f -l force -d "Like -t, but ignore bad-Prereq patches, assu complete -c patch -s F -l fuzz -x -d "Number of LINES for inexact 'fuzzy' matching" -a "(seq 0 9){\tfuzz lines}" complete -c patch -s g -l get -x -d "Get files from RCS etc. if positive; ask if negative" -a '(seq -1 1){\t\n}' complete -c patch -l help -f -d "Display help" -complete -c patch -s i -l input -x -d "Read patch from FILE instead of stdin" -a "( __fish_complete_suffix .patch - __fish_complete_suffix .diff )" +complete -c patch -s i -l input -x -d "Read patch from FILE instead of stdin" -a "( __fish_complete_suffix .patch; __fish_complete_suffix .diff)" complete -c patch -s l -l ignore-whitespace -d "Ignore whitespace changes between patch & input" complete -c patch -s n -l normal -d "Interpret patch as normal diff" complete -c patch -s N -l forward -d "Ignore patches that seem reversed or already applied" @@ -43,4 +42,3 @@ complete -c patch -s Z -l set-utc -d "Set times of patched files assuming diff u # No effect on POSIX systems that don't use O_BINARY/O_TEXT uname -s | string match -q CYGWIN\* and complete -c patch -l binary -d "Read & write data in binary mode" - diff --git a/share/completions/pine.fish b/share/completions/pine.fish index c6cdc31e1..cc7278b3a 100644 --- a/share/completions/pine.fish +++ b/share/completions/pine.fish @@ -1,4 +1,4 @@ -complete -c pine -s f -d "Open folder" -a "(cd ~/.Mail; ls -d *)" +complete -c pine -s f -d "Open folder" -a "(ls -d ~/.Mail/*)" complete -c pine -s F -d "Open file" -r complete -c pine -s h -d "Display help and exit" complete -c pine -s i -d "Start in folder index"