From baf510279733c8ff3f142c6370d977d8bfac3e30 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Fri, 19 Jan 2024 11:39:15 +0800 Subject: [PATCH] completions for apt and apt-get (cherry picked from commit 65cf6ada568b971ba77669747d82419ca423ee1d) --- share/completions/apt-get.fish | 3 +++ share/completions/apt.fish | 13 ++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/share/completions/apt-get.fish b/share/completions/apt-get.fish index 790e7a1c6..1889504d0 100644 --- a/share/completions/apt-get.fish +++ b/share/completions/apt-get.fish @@ -36,6 +36,7 @@ complete -f -n __fish_apt_no_subcommand -c apt-get -a clean -d 'Clean local cach 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 -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' complete -c apt-get -s f -l fix-broken -d 'Correct broken dependencies' complete -c apt-get -s m -l fix-missing -d 'Ignore missing packages' @@ -43,10 +44,12 @@ complete -c apt-get -l no-download -d 'Disable downloading packages' complete -c apt-get -s q -l quiet -d 'Quiet mode' complete -c apt-get -s s -l simulate -l just-print -l dry-run -l recon -l no-act -d 'Perform a simulation' complete -c apt-get -s y -l yes -l assume-yes -d 'Automatic yes to prompts' +complete -c apt-get -l assume-no -d 'Automatic no to prompts' complete -c apt-get -s u -l show-upgraded -d 'Show upgraded packages' complete -c apt-get -s V -l verbose-versions -d 'Show full versions for packages' complete -c apt-get -s b -l compile -l build -d 'Compile source packages' complete -c apt-get -l install-recommends -d 'Install recommended packages' +complete -c apt-get -l install-suggests -d 'Install suggested packages' complete -c apt-get -l ignore-hold -d 'Ignore package Holds' complete -c apt-get -l no-upgrade -d "Do not upgrade packages" complete -c apt-get -l force-yes -d 'Force yes' diff --git a/share/completions/apt.fish b/share/completions/apt.fish index 9a3443e8a..8ce4ace63 100644 --- a/share/completions/apt.fish +++ b/share/completions/apt.fish @@ -37,7 +37,18 @@ complete -k -c apt -n "__fish_seen_subcommand_from $pkg_subcmds" -a '(__fish_pri 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 +complete -c apt -n "__fish_seen_subcommand_from install" -l no-install-recommends -d 'Do not install recommended packages' +complete -c apt -n "__fish_seen_subcommand_from install" -l no-install-suggests -d 'Do not install suggested packages' +complete -c apt -n "__fish_seen_subcommand_from install" -s d -l download-only -d 'Download Only' +complete -c apt -n "__fish_seen_subcommand_from install" -s f -l fix-broken -d 'Correct broken dependencies' +complete -c apt -n "__fish_seen_subcommand_from install" -s m -l fix-missing -d 'Ignore missing packages' +complete -c apt -n "__fish_seen_subcommand_from install" -l no-download -d 'Disable downloading packages' +complete -c apt -n "__fish_seen_subcommand_from install" -s q -l quiet -d 'Quiet mode' +complete -c apt -n "__fish_seen_subcommand_from install" -s s -l simulate -l just-print -l dry-run -l recon -l no-act -d 'Perform a simulation' +complete -c apt -n "__fish_seen_subcommand_from install" -s y -l yes -l assume-yes -d 'Automatic yes to prompts' +complete -c apt -n "__fish_seen_subcommand_from install" -l assume-no -d 'Automatic no to prompts' +complete -c apt -n "__fish_seen_subcommand_from install" -l install-recommends -d 'Install recommended packages' +complete -c apt -n "__fish_seen_subcommand_from install" -l install-suggests -d 'Install suggested packages' # This advanced flag is the safest way to upgrade packages that otherwise would have been kept back complete -c apt -n "__fish_seen_subcommand_from upgrade" -l with-new-pkgs