mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-03 15:40:32 +00:00
commit
31f1c3540b
@ -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
|
|||||||
$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
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user