Commit 31f1c354 authored by Stephen M. Coakley's avatar Stephen M. Coakley Committed by GitHub

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

Fix #529
parents a89771c1 2785f2d5
...@@ -14,7 +14,11 @@ function omf.cli.theme -a name ...@@ -14,7 +14,11 @@ function omf.cli.theme -a name
echo (omf::under)"Available:"(omf::off) echo (omf::under)"Available:"(omf::off)
omf.index.query --type=theme | column omf.index.query --type=theme | column
case 1 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 '*' case '*'
echo (omf::err)"Invalid number of arguments"(omf::off) >&2 echo (omf::err)"Invalid number of arguments"(omf::off) >&2
echo "Usage: $_ "(omf::em)"$argv[1]"(omf::off)" [<theme name>]" >&2 echo "Usage: $_ "(omf::em)"$argv[1]"(omf::off)" [<theme name>]" >&2
......
...@@ -67,10 +67,6 @@ function omf.packages.new -a option name ...@@ -67,10 +67,6 @@ function omf.packages.new -a option name
$github $user $name $github $user $name
echo (omf::em)"Switched to $dir"(omf::off) echo (omf::em)"Switched to $dir"(omf::off)
if test "$option" = themes
omf.theme.set $name
end
else else
echo (omf::err)"\$OMF_CONFIG and/or \$OMF_PATH undefined."(omf::off) >&2 echo (omf::err)"\$OMF_CONFIG and/or \$OMF_PATH undefined."(omf::off) >&2
exit $OMF_UNKNOWN_ERR exit $OMF_UNKNOWN_ERR
......
function omf.theme.set -a target_theme function omf.theme.set -a target_theme
if not contains "$target_theme" (omf.packages.list --theme) if not test -d $OMF_PATH/themes/$target_theme
echo (omf::err)"Theme not installed!"(omf::off)
echo Install it using (omf::em)omf install $target_theme(omf::off)
return $OMF_INVALID_ARG return $OMF_INVALID_ARG
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment