oh-my-fish/pkg/omf/functions/cli/omf.cli.install.fish
Stephen M. Coakley 2d1deeb5fd Replace package database with independently installed package repositories (#427)
Replace package database with independently installed package repositories

- Add support for fetching and installing from package repositories containing package URLs and metadata
- Support multiple package repository sources
- Add new repo command
- Remove submit command
- Enhance describe and search commands
- Fix and improve help text for new and adjusted commands
- Fix bundle install exit status
- Refer to plugins as "plugins" instead of the general term "packages"
- Code clarity improvements
- Put plugin/theme distinction into package metadata
2017-02-04 21:49:39 -06:00

28 lines
530 B
Fish

function omf.cli.install
set fail_count 0
omf.index.update
or return 1
switch (count $argv)
case 0
omf.bundle.install;
or set fail_count 1
case '*'
for package in $argv
omf.packages.install $package;
and require $package
# If package is a theme, set it to active.
if contains -- $package (omf.packages.list --theme)
omf.theme.set $package
end
test $status != 0;
and set fail_count (math $fail_count + 1)
end
end
return $fail_count
end