mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 13:34:40 +08:00
Fix truncated completions for pkg install <foo>
The same hack that is used for `pkg remove <foo>` is required here, too. Due to the massive number of results, we use `head -n 250` to prevent the completion from hanging or the shell from being overencumbered by too many possibe completions. However, this would only generate matches for any of the first 250 packages, rather than printing the first 250 packages that match. [ci skip]
This commit is contained in:
parent
3291102045
commit
d27f477ba6
@ -27,8 +27,8 @@ end
|
||||
|
||||
complete -c apt -f
|
||||
|
||||
complete -k -c apt -n "__fish_seen_subcommand_from $pkg_subcmds" -a '(__fish_print_apt_packages | head -n 250 | sort)'
|
||||
complete -c apt -n "__fish_seen_subcommand_from $installed_pkg_subcmds" -a '(__fish_print_apt_packages --installed | string match -re -- "(?:\\b|_)"(commandline -ct | string escape --style=regex) | head -n 250)' -d Package
|
||||
complete -k -c apt -n "__fish_seen_subcommand_from $pkg_subcmds" -a '(__fish_print_apt_packages | string match -re -- "(?:\\b|_)"(commandline -ct | string escape --style=regex) | head -n 250 | sort)'
|
||||
complete -c apt -n "__fish_seen_subcommand_from $installed_pkg_subcmds" -a '(__fish_print_apt_packages --installed | string match -re -- "(?:\\b|_)"(commandline -ct | string escape --style=regex) | head -n 250)'
|
||||
complete -k -c apt -n "__fish_seen_subcommand_from $handle_file_pkg_subcmds" -a '(__fish_complete_suffix .deb)'
|
||||
|
||||
complete -c apt -n "__fish_seen_subcommand_from install" -l no-install-recommends
|
||||
|
Loading…
x
Reference in New Issue
Block a user