diff --git a/config/fish/functions/e.fish b/config/fish/functions/e.fish index caef691..b21c346 100644 --- a/config/fish/functions/e.fish +++ b/config/fish/functions/e.fish @@ -1,10 +1,10 @@ function e if [ (count $argv) -gt 0 ] - atom $argv + code $argv else set -l out (mktemp -d) cat > $out/stdin - atom $out/stdin + code $out/stdin end end diff --git a/config/fish/functions/fish_right_prompt.fish b/config/fish/functions/fish_right_prompt.fish index 933caee..aa3d913 100644 --- a/config/fish/functions/fish_right_prompt.fish +++ b/config/fish/functions/fish_right_prompt.fish @@ -1,10 +1,15 @@ function fish_right_prompt set -l red (set_color red) set -l normal (set_color normal) + set -l error (set_color $fish_color_error) - if contains rbenv (functions) - echo $red(rbenv version-name)$normal - else if contains asdf (functions) - echo $red(fast-asdf-version ruby)$normal + if contains asdf (functions) + set -l ruby_version (fast-asdf-version ruby) + + if asdf where ruby &> /dev/null + echo $red$ruby_version$normal + else + echo $error$ruby_version$normal + end end end