Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding list and installed subcommands #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions completions/apt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ complete -c apt -n "__fish_use_subcommand" -a clean -f

complete -c apt -n "__fish_use_subcommand" -a "install in" -x

complete -c apt -n "__fish_use_subcommand" -a installed -f

complete -c apt -n "__fish_use_subcommand" -a list -f

complete -c apt -n "__fish_use_subcommand" -a policy -f

complete -c apt -n "__fish_use_subcommand" -a ppa -x
Expand Down
6 changes: 6 additions & 0 deletions functions/apt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ function apt -d "Short and friendly command wrapper for APT"
case install in
sudo apt-get $apt_get_flags install $argv[2..-1]

case installed
command apt list --installed $argv[2..-1]

case list
command apt list $argv[2..-1]

case policy
env LANG=C apt-cache policy

Expand Down
2 changes: 2 additions & 0 deletions functions/apt.help.fish
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Commands:
check Verify that there are no broken dependencies.
clean Erase old downloaded archive files.
install [Alias: in] Install packages.
installed List all installed packages (can be filtered)
list List all packages (can be filtered)
policy Shows policy settings.
ppa Adds or removes PPA packages sources.
purge Removes packages and their configuration files.
Expand Down