Commit b36bc03e authored by Bruno Pinto's avatar Bruno Pinto

Remove global OSTYPE variable.

parent 2ac89b5a
...@@ -26,8 +26,6 @@ else ...@@ -26,8 +26,6 @@ else
set -gx ORIGINAL_PATH $PATH set -gx ORIGINAL_PATH $PATH
end end
set -q OSTYPE; or set -g OSTYPE (uname)
# Save the head of function path and autoload core functions # Save the head of function path and autoload core functions
set -l user_function_path $fish_function_path[1] set -l user_function_path $fish_function_path[1]
set fish_function_path[1] $OMF_PATH/lib set fish_function_path[1] $OMF_PATH/lib
......
...@@ -97,9 +97,10 @@ function omf -d "Oh My Fish" ...@@ -97,9 +97,10 @@ function omf -d "Oh My Fish"
case "t" "theme" case "t" "theme"
if test (count $argv) -eq 1 if test (count $argv) -eq 1
set -l ostype (uname)
set -l theme (cat $OMF_CONFIG/theme) set -l theme (cat $OMF_CONFIG/theme)
set -l regex "[[:<:]]($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.list_themes | column | sed -E "s/$regex/"(omf::em)"\1"(omf::off)"/"
omf::off omf::off
......
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