oh-my-fish/pkg/omf/util/omf.util_valid_package.fish
Bruno Pinto 7dad917436 Make default theme the default theme for omf.
* On clean install, configure and download `default` theme.
* Do not allow `default` theme to be removed.
* When the current theme is removed, fallback to `default`.
2015-09-01 12:38:32 +01:00

16 lines
473 B
Fish

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
case "*/*" "* *" "*&*" "*\"*" "*!*" "*&*" "*%*" "*#*"
return 10
case "*"
return 0
end
case "*"
return 10
end
end