Fix -U complete

__fish_complete_suffix function is changed.
This commit is contained in:
Akatsuki 2020-02-23 03:02:45 +08:00 committed by Jguer
parent 558c17f67c
commit d5718b7406
No known key found for this signature in database
GPG Key ID: 6D6CC9BEA8556B35

View File

@ -146,8 +146,8 @@ complete -c $progname -n "$sync" -xa "$listall $listgroups"
# Upgrade options
# Theoretically, pacman reads packages in all formats that libarchive supports
# In practice, it's going to be tar.xz, tar.gz or tar.zst
# Using "pkg.tar.*" here would change __fish_complete_suffix's descriptions to "unknown"
complete -c $progname -n "$upgrade" -d 'Package file' -xa "(__fish_complete_suffix .pkg.tar\{,.xz,.gz,.zst\})"
complete -c $progname -n "$upgrade" -xa '(__fish_complete_suffix pkg.tar.zst; __fish_complete_suffix pkg.tar.xz; __fish_complete_suffix pkg.tar.gz)' -d 'Package file'
# Yay operations
complete -c $progname -s Y -f -l yay -n "$noopt" -d 'Yay specific operations'