mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-23 04:51:16 -03:00
completions/apt & apt-get: Let autoremove and autopurge take packages
- add complete for apt-get's autopurge - continue #7095, add complete for apt/apt-get's autoremove and autopurge
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
function __fish_apt_no_subcommand -d 'Test if apt has yet to be given the subcommand'
|
||||
for i in (commandline -xpc)
|
||||
if contains -- $i update upgrade dselect-upgrade dist-upgrade install remove purge source build-dep check clean autoclean changelog
|
||||
if contains -- $i update upgrade dselect-upgrade dist-upgrade install remove purge autoremove autopurge source build-dep check clean autoclean changelog
|
||||
return 1
|
||||
end
|
||||
end
|
||||
@@ -11,7 +11,7 @@ end
|
||||
|
||||
function __fish_apt_use_package -d 'Test if apt command should have packages as potential completion'
|
||||
for i in (commandline -xpc)
|
||||
if contains -- $i contains install remove purge build-dep changelog
|
||||
if contains -- $i contains install remove purge autoremove autopurge build-dep changelog
|
||||
return 0
|
||||
end
|
||||
end
|
||||
@@ -34,7 +34,8 @@ complete -f -n __fish_apt_no_subcommand -c apt-get -a build-dep -d 'Install/remo
|
||||
complete -f -n __fish_apt_no_subcommand -c apt-get -a check -d 'Update cache and check dependencies'
|
||||
complete -f -n __fish_apt_no_subcommand -c apt-get -a clean -d 'Clean local caches and packages'
|
||||
complete -f -n __fish_apt_no_subcommand -c apt-get -a autoclean -d 'Clean packages no longer be downloaded'
|
||||
complete -f -n __fish_apt_no_subcommand -c apt-get -a autoremove -d 'Remove automatically installed packages'
|
||||
complete -f -n __fish_apt_no_subcommand -c apt-get -a autoremove -d 'Remove packages no longer needed as dependencies'
|
||||
complete -f -n __fish_apt_no_subcommand -c apt-get -a autopurge -d 'Remove packages no longer needed as dependencies and delete their config files'
|
||||
complete -c apt-get -l no-install-recommends -d 'Do not install recommended packages'
|
||||
complete -c apt-get -l no-install-suggests -d 'Do not install suggested packages'
|
||||
complete -c apt-get -s d -l download-only -d 'Download Only'
|
||||
|
||||
@@ -6,8 +6,8 @@ if [ "$(uname -s)" = Darwin -a "$(command -s apt)" = /usr/bin/apt ]
|
||||
exit 1
|
||||
end
|
||||
|
||||
set -l all_subcmds update upgrade full-upgrade search list install show remove edit-sources purge changelog autoremove depends rdepends
|
||||
set -l pkg_subcmds install upgrade full-upgrade show search purge changelog policy depends rdepends autoremove
|
||||
set -l all_subcmds update upgrade full-upgrade search list install show remove edit-sources purge changelog autoremove autopurge depends rdepends
|
||||
set -l pkg_subcmds install upgrade full-upgrade show search purge changelog policy depends rdepends autoremove autopurge
|
||||
set -l installed_pkg_subcmds remove
|
||||
set -l handle_file_pkg_subcmds install
|
||||
|
||||
@@ -114,7 +114,7 @@ __fish_apt_subcommand changelog -r -d 'Download and display package changelog'
|
||||
# Autoremove
|
||||
__fish_apt_subcommand autoremove -d 'Remove packages no longer needed as dependencies'
|
||||
|
||||
# Autoremove
|
||||
# Autopurge
|
||||
__fish_apt_subcommand autopurge -d 'Remove packages no longer needed as dependencies and delete their config files'
|
||||
|
||||
# Clean
|
||||
|
||||
Reference in New Issue
Block a user