mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-15 22:44:01 +00:00
completions/unzip: Stop filtering suffixes
It's unhelpful quite often. See #7040.
This commit is contained in:
parent
2f7ac8767e
commit
46068cd257
1 changed files with 1 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue