Minor edits

This commit is contained in:
Ilan Cosman 2020-06-10 09:18:15 -07:00
parent 12865bded1
commit 3be937b287
5 changed files with 13 additions and 15 deletions

View File

@ -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!

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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