Commit d107b2ec authored by Jorge Bucaran's avatar Jorge Bucaran

simplify color setters

parent 84872300
# SYNOPSIS # SYNOPSIS
# Oh My Fish CLI # Oh My Fish! CLI
# #
# ENV # ENV
# OMF_VERSION Version # OMF_CONFIG Oh My Fish! configuration
# OMF_CONFIG Oh My Fish configuration
# #
# OVERVIEW # OVERVIEW
# Provides options to list, download and remove packages, update # Provides options to list, download and remove packages, update
...@@ -14,29 +13,18 @@ set -g OMF_UNKNOWN_OPT 2 ...@@ -14,29 +13,18 @@ set -g OMF_UNKNOWN_OPT 2
set -g OMF_INVALID_ARG 3 set -g OMF_INVALID_ARG 3
set -g OMF_UNKNOWN_ERR 4 set -g OMF_UNKNOWN_ERR 4
set -g OMF_VERSION "1.0.0"
function omf::em function omf::em
if set -q fish_color_match set_color $fish_color_match ^/dev/null; or set_color cyan
set_color $fish_color_match
else
set_color cyan
end
end end
function omf::dim function omf::dim
if set -q fish_color_autosuggestion set_color $fish_color_match ^/dev/null; or set_color 555
set_color $fish_color_autosuggestion
else
set_color 555
end
end end
function omf::err function omf::err
if set -q fish_color_error set_color $fish_color_error ^/dev/null; or set_color red --bold
set_color $fish_color_error
else
set_color red --bold
end
end end
function omf::off function omf::off
set_color normal set_color normal
end end
......
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