From 46068cd257c36ee63b718f3696f64f417fb97bb5 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 27 May 2020 19:35:17 +0200 Subject: [PATCH] completions/unzip: Stop filtering suffixes It's unhelpful quite often. See #7040. --- share/completions/unzip.fish | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/share/completions/unzip.fish b/share/completions/unzip.fish index aa0fb52e9..09b0c610e 100644 --- a/share/completions/unzip.fish +++ b/share/completions/unzip.fish @@ -26,25 +26,7 @@ complete -c unzip -s M -d "pipe through `more` pager" # Debian version of unzip if unzip -v 2>/dev/null | string match -eq Debian - - # the first non-switch argument should be the zipfile - complete -c unzip -n __fish_is_first_token -xa '( - __fish_complete_suffix .zip - __fish_complete_suffix .jar - __fish_complete_suffix .aar - )' - - # Files thereafter are either files to include or exclude from the operation + # Files after the first token are either files to include or exclude from the operation set -l zipfile complete -c unzip -n 'not __fish_is_first_token' -xa '(unzip -l (eval set zipfile (__fish_first_token); echo $zipfile) | string replace -r --filter ".*:\S+\s+(.*)" "\$1")' - -else - - # all tokens should be zip files - complete -c unzip -xa '( - __fish_complete_suffix .zip - __fish_complete_suffix .jar - __fish_complete_suffix .aar - )' - end