mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-02-15 19:12:45 +08:00
![Stephen M. Coakley](/assets/img/avatar_default.png)
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
32 lines
708 B
Fish
32 lines
708 B
Fish
set -l builtin_packages {$OMF_PATH,$OMF_CONFIG}/pkg*/{omf,fish-spec}
|
|
|
|
|
|
function omf.packages.list -d 'List installed packages'
|
|
set -l show_plugins
|
|
set -l show_themes
|
|
|
|
if begin; contains -- --plugin $argv; or contains -- -p $argv; end
|
|
set -e show_themes
|
|
end
|
|
|
|
if begin; contains -- --theme $argv; or contains -- -t $argv; end
|
|
set show_themes
|
|
set -e show_plugins
|
|
end
|
|
|
|
set -l plugins_paths $OMF_PATH/pkg/*
|
|
set -l themes_paths $OMF_PATH/themes/*
|
|
|
|
if set -q show_plugins
|
|
for path in $plugins_paths
|
|
contains $path $builtin_packages; or command basename $path
|
|
end
|
|
end
|
|
|
|
if set -q show_themes
|
|
for path in $themes_paths
|
|
command basename $path
|
|
end
|
|
end
|
|
end
|