mirror of
				https://github.com/oh-my-fish/theme-bobthefish.git
				synced 2025-06-13 13:03:54 +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 (**`!`**) |      * Previous command failed (**`!`**) | ||||||
|      * Background jobs (**`%`**) |      * Background jobs (**`%`**) | ||||||
|      * You currently have superpowers (**`$`**) |      * You currently have superpowers (**`$`**) | ||||||
|  |      * Cursor on newline | ||||||
|  * Current vi mode |  * Current vi mode | ||||||
|  * `User@Host` (unless you're the default user) |  * `User@Host` (unless you're the default user) | ||||||
|  * Current RVM, rbenv or chruby (Ruby) version |  * 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 theme_color_scheme dark | ||||||
| set -g fish_prompt_pwd_dir_length 0 | set -g fish_prompt_pwd_dir_length 0 | ||||||
| set -g theme_project_dir_length 1 | set -g theme_project_dir_length 1 | ||||||
|  | set -g theme_newline_cursor yes | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| **Title options** | **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 :) | - `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. | - `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_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** | **Color scheme options** | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -36,6 +36,7 @@ | |||||||
| #     set -g theme_color_scheme dark | #     set -g theme_color_scheme dark | ||||||
| #     set -g fish_prompt_pwd_dir_length 0 | #     set -g fish_prompt_pwd_dir_length 0 | ||||||
| #     set -g theme_project_dir_length 1 | #     set -g theme_project_dir_length 1 | ||||||
|  | #     set -g theme_newline_cursor yes | ||||||
| 
 | 
 | ||||||
| # =========================== | # =========================== | ||||||
| # Helper methods | # Helper methods | ||||||
| @ -279,6 +280,16 @@ function __bobthefish_finish_segments -S -d 'Close open prompt segments' | |||||||
|     echo -ns $__bobthefish_right_black_arrow_glyph ' ' |     echo -ns $__bobthefish_right_black_arrow_glyph ' ' | ||||||
|   end |   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_color normal | ||||||
|   set __bobthefish_current_bg |   set __bobthefish_current_bg | ||||||
| end | end | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user