Remove global OSTYPE variable.

pull/9/head
Bruno Pinto 9 years ago
parent 2ac89b5a1c
commit b36bc03eb0

@ -26,8 +26,6 @@ else
set -gx ORIGINAL_PATH $PATH
end
set -q OSTYPE; or set -g OSTYPE (uname)
# Save the head of function path and autoload core functions
set -l user_function_path $fish_function_path[1]
set fish_function_path[1] $OMF_PATH/lib

@ -97,9 +97,10 @@ function omf -d "Oh My Fish"
case "t" "theme"
if test (count $argv) -eq 1
set -l ostype (uname)
set -l theme (cat $OMF_CONFIG/theme)
set -l regex "[[:<:]]($theme)[[:>:]]"
test "$OSTYPE" != "Darwin"; and set regex "\b($theme)\b"
test "$ostype" != "Darwin"; and set regex "\b($theme)\b"
omf.list_themes | column | sed -E "s/$regex/"(omf::em)"\1"(omf::off)"/"
omf::off

Loading…
Cancel
Save