Merge pull request #579 from fish-shell/default-theme

Make `default` theme the default theme for omf.
pull/2/head
Bruno 9 years ago
commit 1dc0c0ecca

@ -99,8 +99,8 @@ omf_install() {
if [ ! -d "${OMF_CONFIG}" ]; then
echo "Writing Oh My Fish configuration → ${OMF_CONFIG}"
mkdir -p "${OMF_CONFIG}"
touch "${OMF_CONFIG}/theme"
touch "${OMF_CONFIG}/bundle"
test -f "${OMF_CONFIG}/bundle" || echo "theme default" > "${OMF_CONFIG}/bundle"
test -f "${OMF_CONFIG}/theme" || echo default > "${OMF_CONFIG}/theme"
test -f "${OMF_CONFIG}/revision" || echo ${git_rev} > "${OMF_CONFIG}/revision"
else
fish -c "omf install"

@ -27,8 +27,8 @@ function omf.remove_package
set -l remove_status 1
if not omf.util_valid_package $pkg
if test $pkg = "omf"
echo (omf::err)"You can't remove `omf`"(omf::off) 1^&2
if test $pkg = "omf" -o $pkg = "default"
echo (omf::err)"You can't remove `$pkg`"(omf::off) 1^&2
else
echo (omf::err)"$pkg is not a valid package/theme name"(omf::off) 1^&2
end
@ -49,7 +49,7 @@ function omf.remove_package
not test -d $path; and continue
if test $pkg = (cat $OMF_CONFIG/theme)
echo "" > $OMF_CONFIG/theme
echo default > $OMF_CONFIG/theme
end
_remove_from_bundle "theme" $pkg

@ -1,5 +1,6 @@
function omf.util_valid_package -a package
test (echo "$package" | tr "[:upper:]" "[:lower:]") = "omf"; and return 10
test (echo "$package" | tr "[:upper:]" "[:lower:]") = "default"; and return 10
switch $package
case {a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}\*
switch $package

Loading…
Cancel
Save