mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-02-21 06:18:24 +08:00
describe works on installed packages
also modified list_db_packages to return all packages by default, but with a skip_installed to skip listing installed packages
This commit is contained in:
parent
0a32588f4b
commit
633e52101b
@ -1,6 +1,11 @@
|
||||
# List all packages available to install from the registry.
|
||||
function omf.list_db_packages
|
||||
function omf.list_db_packages -a skip_installed
|
||||
for item in (basename $OMF_PATH/db/pkg/*)
|
||||
contains $item (basename {$OMF_PATH,$OMF_CONFIG}/pkg/*); or echo $item
|
||||
if begin
|
||||
test -z $skip_installed
|
||||
or not contains $item (basename {$OMF_PATH,$OMF_CONFIG}/pkg/*)
|
||||
end
|
||||
echo $item
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -16,7 +16,7 @@ complete -c omf -n "__omf.opt_is q query" -a (printf "%s " (set | awk '{
|
||||
complete -c omf -n "__omf.opt_is r rm remove" -a (printf "%s " (omf.list_local_packages) (omf.list_installed_themes))
|
||||
complete -c omf -n "__omf.opt_is d desc describe" -a (printf "%s " (omf.list_db_packages))
|
||||
complete -c omf -n "__omf.opt_is c cd" -a (printf "%s " (omf.list_db_packages))
|
||||
complete -c omf -n "__omf.opt_is i install" -a (printf "%s " (omf.list_db_packages))
|
||||
complete -c omf -n "__omf.opt_is i install" -a (printf "%s " (omf.list_db_packages "skip installed packages"))
|
||||
complete -c omf -n "__omf.opt_is t theme" -a (printf "%s " (omf.list_themes))
|
||||
complete -c omf -n "__omf.opt_is help" -a "install theme remove update list describe cd new submit query destroy"
|
||||
|
||||
|
@ -89,7 +89,7 @@ function omf -d "Oh My Fish"
|
||||
|
||||
case "i" "install" "get"
|
||||
if test (count $argv) -eq 1
|
||||
omf.list_db_packages | column
|
||||
omf.list_db_packages "skip installed packages" | column
|
||||
else
|
||||
omf.install_package $argv[2..-1]
|
||||
refresh
|
||||
|
Loading…
x
Reference in New Issue
Block a user