mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-02-03 04:57:30 +08:00
49dda5c2f7
This updates omf plugin to new architecture, moving functions to `functions` directory. It also revamps the separation of concerns between CLI and underlying implementations, organizing them into directories, whose are autoloaded in plugin startup.
12 lines
437 B
Fish
12 lines
437 B
Fish
function omf.cli.themes.list
|
|
set -l theme (cat $OMF_CONFIG/theme)
|
|
set -l regex_current "(^|[[:space:]])($theme)([[:space:]]|\$)"
|
|
set -l highlight_current s/"$regex_current"/"\1"(omf::em)"\2"(omf::off)"\3"/g
|
|
|
|
echo (omf::under)"Installed:"(omf::off)
|
|
omf.packages.list --installed --theme | column | sed -E "$highlight_current"
|
|
echo
|
|
echo (omf::under)"Available:"(omf::off)
|
|
omf.packages.list --available --theme | column
|
|
end
|