diff --git a/config/fish/fishfile b/config/fish/fishfile index 045a41a..42ff29b 100644 --- a/config/fish/fishfile +++ b/config/fish/fishfile @@ -4,4 +4,4 @@ fishgretel/fasd 2m/fish-gpg-tty asdf-vm/asdf edc/bass -oh-my-fish/theme-l +oh-my-fish/theme-mtahmed diff --git a/config/fish/functions/fish_right_prompt.fish b/config/fish/functions/fish_right_prompt.fish index 464ba37..c8eb8b5 100644 --- a/config/fish/functions/fish_right_prompt.fish +++ b/config/fish/functions/fish_right_prompt.fish @@ -1,37 +1,12 @@ -# To show the right prompt please set -# set theme_display_rbenv 'yes' (config.fish) -# set theme_display_rbenv_gemset 'yes' (config.fish) -# set theme_display_rbenv_with_gemfile_only 'yes' (config.fish) - -function _ruby_version - echo (command rbenv version-name | sed 's/\n//') -end - -function _ruby_gemset - echo (command rbenv gemset active ^/dev/null | sed -e 's| global||') -end - +# name: mtahmed +# Left prompt: +# - First 10 characters of hostname if ssh'ed +# - Current directory name +# - ─╼ +# Right prompt: +# - Exit code of the previous command function fish_right_prompt - if [ "$theme_display_rbenv" = 'yes' ] - set -l red (set_color red) - set -l normal (set_color normal) - set ruby_info $red(_ruby_version) - - if [ "$theme_display_rbenv_gemset" = 'yes' ] - if [ (_ruby_gemset) ] - set -l ruby_gemset $red(_ruby_gemset) - set ruby_info "$ruby_info@$ruby_gemset" - end - end - - if [ "$theme_display_rbenv_with_gemfile_only" = 'yes' ] - if test -f Gemfile - echo -n -s $ruby_info $normal - else - echo -n -s $normal - end - else - echo -n -s $ruby_info $normal - end - end + set -l last_status $status + set_color $fish_color_cwd + printf $last_status end