Merge pull request #530 from oh-my-fish/fix/529-omf-new-theme

Fix #529
pull/564/head
Stephen M. Coakley 7 years ago committed by GitHub
commit 31f1c3540b

@ -14,7 +14,11 @@ function omf.cli.theme -a name
echo (omf::under)"Available:"(omf::off)
omf.index.query --type=theme | column
case 1
omf.theme.set $name
if not omf.theme.set $name
echo (omf::err)"Theme not installed!"(omf::off)
echo Install it using (omf::em)omf install $name(omf::off)
return $OMF_INVALID_ARG
end
case '*'
echo (omf::err)"Invalid number of arguments"(omf::off) >&2
echo "Usage: $_ "(omf::em)"$argv[1]"(omf::off)" [<theme name>]" >&2

@ -67,10 +67,6 @@ function omf.packages.new -a option name
$github $user $name
echo (omf::em)"Switched to $dir"(omf::off)
if test "$option" = themes
omf.theme.set $name
end
else
echo (omf::err)"\$OMF_CONFIG and/or \$OMF_PATH undefined."(omf::off) >&2
exit $OMF_UNKNOWN_ERR

@ -1,7 +1,5 @@
function omf.theme.set -a target_theme
if not contains "$target_theme" (omf.packages.list --theme)
echo (omf::err)"Theme not installed!"(omf::off)
echo Install it using (omf::em)omf install $target_theme(omf::off)
if not test -d $OMF_PATH/themes/$target_theme
return $OMF_INVALID_ARG
end

Loading…
Cancel
Save