Commit 633e5210 authored by Sheldon Els's avatar Sheldon Els

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
parent 0a32588f
# 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment