oh-my-fish/pkg/omf/functions/search/omf.search.pkg.fish
Luís Fiolhais 15e9af84b1 Search Function (#314)
Add new search command
2016-05-11 13:29:50 -05:00

11 lines
290 B
Fish

function omf.search.pkg -a item -d "Search db/pkg for the specified item"
set -l available_pkg (omf.packages.list --database --plugin)
echo (omf::under)"Packages"(omf::off)
set -l regex "([A-Za-z0-9-]*)($item)([A-Za-z0-9-]*)"
echo $available_pkg | egrep -io $regex | column
end