mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2024-10-27 20:34:23 +00:00
Merge pull request #92 from druchoo/feature/cursor_on_a_new_line
Feature/cursor on a new line
This commit is contained in:
commit
8f055587da
@ -41,6 +41,7 @@ This theme is based loosely on [agnoster][agnoster].
|
||||
* Previous command failed (**`!`**)
|
||||
* Background jobs (**`%`**)
|
||||
* You currently have superpowers (**`$`**)
|
||||
* Cursor on newline
|
||||
* Current vi mode
|
||||
* `User@Host` (unless you're the default user)
|
||||
* Current RVM, rbenv or chruby (Ruby) version
|
||||
@ -92,6 +93,7 @@ set -g default_user your_normal_user
|
||||
set -g theme_color_scheme dark
|
||||
set -g fish_prompt_pwd_dir_length 0
|
||||
set -g theme_project_dir_length 1
|
||||
set -g theme_newline_cursor yes
|
||||
```
|
||||
|
||||
**Title options**
|
||||
@ -109,6 +111,7 @@ set -g theme_project_dir_length 1
|
||||
- `theme_git_worktree_support`. If you do any git worktree shenanigans, setting this to `yes` will fix incorrect project-relative path display. If you don't do any git worktree shenanigans, leave it disabled. It's faster this way :)
|
||||
- `fish_prompt_pwd_dir_length`. bobthefish respects the Fish `$fish_prompt_pwd_dir_length` setting to abbreviate the prompt path. Set to `0` to show the full path, `1` (default) to show only the first character of each parent directory name, or any other number to show up to that many characters.
|
||||
- `theme_project_dir_length`. The same as `$fish_prompt_pwd_dir_length`, but for the path relative to the current project root. Defaults to `0`; set to any other number to show an abbreviated path.
|
||||
- `theme_newline_cursor`. Use `yes` to have cursor start on a new line. By default the prompt is only one line. When working with long directories it may be preferrend to have cursor on the next line.
|
||||
|
||||
**Color scheme options**
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
# set -g theme_color_scheme dark
|
||||
# set -g fish_prompt_pwd_dir_length 0
|
||||
# set -g theme_project_dir_length 1
|
||||
# set -g theme_newline_cursor yes
|
||||
|
||||
# ===========================
|
||||
# Helper methods
|
||||
@ -279,6 +280,16 @@ function __bobthefish_finish_segments -S -d 'Close open prompt segments'
|
||||
echo -ns $__bobthefish_right_black_arrow_glyph ' '
|
||||
end
|
||||
|
||||
if [ "$theme_newline_cursor" = 'yes' ]
|
||||
echo -ens "\n"
|
||||
set_color $fish_color_autosuggestion
|
||||
if [ "$theme_powerline_fonts" = "no" ]
|
||||
echo -ns '> '
|
||||
else
|
||||
echo -ns "$__bobthefish_right_arrow_glyph "
|
||||
end
|
||||
end
|
||||
|
||||
set_color normal
|
||||
set __bobthefish_current_bg
|
||||
end
|
||||
@ -396,9 +407,9 @@ function __bobthefish_prompt_status -S -a last_status -d 'Display symbols for a
|
||||
set_color normal
|
||||
set_color -b $__color_initial_segment_exit
|
||||
if [ "$theme_show_exit_status" = 'yes' ]
|
||||
echo -ns $last_status ' '
|
||||
echo -ns $last_status ' '
|
||||
else
|
||||
echo -n $__bobthefish_nonzero_exit_glyph
|
||||
echo -n $__bobthefish_nonzero_exit_glyph
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user