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 subcommand completions for apt #3695

Closed
wants to merge 1 commit into from
Closed
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
7 changes: 5 additions & 2 deletions share/completions/apt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

function __fish_apt_no_subcommand --description 'Test if apt has yet to be given the subcommand'
for i in (commandline -opc)
if contains -- $i update upgrade full-upgrade search list install show remove edit-sources purge
if contains -- $i update upgrade full-upgrade search list install show remove edit-sources purge changelog
return 1
end
end
Expand All @@ -11,7 +11,7 @@ end

function __fish_apt_use_package --description 'Test if apt command should have packages as potential completion'
for i in (commandline -opc)
if contains -- $i install remove upgrade full-upgrade show search purge
if contains -- $i install remove upgrade full-upgrade show search purge changelog
return 0
end
end
Expand Down Expand Up @@ -66,3 +66,6 @@ __fish_apt_subcommand full-upgrade -r --description 'Upgrade packages, removing

# Purge
__fish_apt_subcommand purge -x --description 'Remove packages and delete their config files'

# Changelog
__fish_apt_subcommand changelog -r --description 'Download and display package changelog'