mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
apt.fish: add completions for "depends" and "rdepends"
This commit is contained in:
parent
49b0c7a4fe
commit
0cd934ea63
1 changed files with 8 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
function __fish_apt_no_subcommand -d 'Test if apt has yet to be given the subcommand'
|
function __fish_apt_no_subcommand -d 'Test if apt has yet to be given the subcommand'
|
||||||
for i in (commandline -opc)
|
for i in (commandline -opc)
|
||||||
if contains -- $i update upgrade full-upgrade search list install show remove edit-sources purge changelog autoremove
|
if contains -- $i update upgrade full-upgrade search list install show remove edit-sources purge changelog autoremove depends rdepends
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -11,7 +11,7 @@ end
|
||||||
|
|
||||||
function __fish_apt_use_package -d 'Test if apt command should have packages as potential completion'
|
function __fish_apt_use_package -d 'Test if apt command should have packages as potential completion'
|
||||||
for i in (commandline -opc)
|
for i in (commandline -opc)
|
||||||
if contains -- $i install remove upgrade full-upgrade show search purge changelog policy
|
if contains -- $i install remove upgrade full-upgrade show search purge changelog policy depends rdepends
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -91,3 +91,9 @@ __fish_apt_subcommand autoremove -d 'Remove packages no longer needed as d
|
||||||
|
|
||||||
# Policy
|
# Policy
|
||||||
__fish_apt_subcommand policy -x -d 'Display source or package priorities'
|
__fish_apt_subcommand policy -x -d 'Display source or package priorities'
|
||||||
|
|
||||||
|
# Depends
|
||||||
|
__fish_apt_subcommand depends -r -d 'List package dependencies'
|
||||||
|
|
||||||
|
# Rdepends
|
||||||
|
__fish_apt_subcommand rdepends -r -d 'List package reverse dependencies'
|
||||||
|
|
Loading…
Reference in a new issue