From 3be937b2870b32899c4cd5f212f756b7dcf30a1e Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Wed, 10 Jun 2020 09:18:15 -0700 Subject: [PATCH] Minor edits --- README.md | 12 ++++++------ conf.d/_tide_on_pwd.fish | 6 +++--- conf.d/_tide_pwd_var_change.fish | 2 +- functions/_tide_item_status.fish | 3 ++- functions/_tide_right_prompt.fish | 5 +---- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 0c98bac..b4951ee 100644 --- a/README.md +++ b/README.md @@ -20,18 +20,18 @@ Tide is a Fish theme inspired by [Powerlevel10k](https://github.com/romkatv/powe # Features -### Multi-Line Right Prompt - -> Fish can't do _that_ yet can it? - -![Multi-Line_Right_Prompt](/media/images/Multi-Line_Right_Prompt.png) - ### Configuration Wizard Type `tide configure` to open the the wizard in your terminal. ![Configuration_Wizard](/media/gifs/Configuration_Wizard.gif) +### Multi-Line Right Prompt + +> Fish can't do _that_ yet can it? + +![Multi-Line_Right_Prompt](/media/images/Multi-Line_Right_Prompt.png) + ### Extensible If there isn't a prompt item that fits your needs, make your own! diff --git a/conf.d/_tide_on_pwd.fish b/conf.d/_tide_on_pwd.fish index 6ab4e80..6a04836 100644 --- a/conf.d/_tide_on_pwd.fish +++ b/conf.d/_tide_on_pwd.fish @@ -1,8 +1,8 @@ function _tide_pwd_var_change -v PWD - set -l blah_pwd (string replace $HOME '~' $PWD) - set -l blah_split_pwd (string split --no-empty '/' $blah_pwd) + set -l preMaxDirsPwd (string replace $HOME '~' $PWD) + set -l preMaxDirsPwdSplit (string split --no-empty '/' $preMaxDirsPwd) - set -g _tide_split_pwd $blah_split_pwd[(math -$tide_pwd_max_dirs)..-1] + set -g _tide_split_pwd $preMaxDirsPwdSplit[(math -$tide_pwd_max_dirs)..-1] set -g _tide_pwd (string join '/' $_tide_split_pwd) set -g _tide_git_dir (git rev-parse --show-toplevel 2>/dev/null) diff --git a/conf.d/_tide_pwd_var_change.fish b/conf.d/_tide_pwd_var_change.fish index 622ac73..ab09e33 100644 --- a/conf.d/_tide_pwd_var_change.fish +++ b/conf.d/_tide_pwd_var_change.fish @@ -16,7 +16,7 @@ function _tide_pwd_var_change -v PWD set -a _tide_pwd_anchors $_tide_split_pwd[-1] end if contains 'git' $tide_pwd_anchors - set -a _tide_pwd_anchors (string replace $HOME '~' $_tide_git_dir | string split --no-empty -r -m1 '/')[-1] + set -a _tide_pwd_anchors (string replace $HOME '~' $_tide_git_dir | string split --no-empty -r -m1 '/')[2] end _tide_pwd diff --git a/functions/_tide_item_status.fish b/functions/_tide_item_status.fish index 5c594f3..75934fc 100644 --- a/functions/_tide_item_status.fish +++ b/functions/_tide_item_status.fish @@ -10,7 +10,8 @@ function _tide_item_status set_color $tide_status_failure_color printf '%s ' {$tide_status_failure_icon} end - printf '%s ' (string replace 'SIG' '' $fishPipestatusWithSignal | string join '|') + string replace 'SIG' '' $fishPipestatusWithSignal | string join '|' + printf '%s' ' ' end end end \ No newline at end of file diff --git a/functions/_tide_right_prompt.fish b/functions/_tide_right_prompt.fish index 70d855d..35db6a8 100644 --- a/functions/_tide_right_prompt.fish +++ b/functions/_tide_right_prompt.fish @@ -32,8 +32,5 @@ function _print_at_end -a text set -l startLocation (math $COLUMNS -(_tide_decolor $text | string length)) _cursor_right $startLocation - printf '%s' $text - - printf '%b' '\v' - printf '%b' '\r' + printf '%s%b' $text '\v\r' end \ No newline at end of file