mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-03-10 05:25:14 +08:00

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
28 lines
530 B
Fish
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
|