Update README, fix minor bugs

This commit is contained in:
Ilan Cosman 2020-06-09 14:43:43 -07:00
parent 2ca2ae22d3
commit 9a9a86cc94
3 changed files with 3 additions and 2 deletions

View File

@ -116,6 +116,7 @@ Tide's git capabilities are inherited from fish's built-in [fish_git_prompt](htt
| pwd_color_anchors | color of anchors | 00AFFF |
| pwd_truncate_margin | number of columns distance to maintain between pwd and edge of terminal | 10 |
| pwd_color_truncated_dirs | color of truncated directories | 8787AF |
| pwd_max_dirs | max number of directories to display, setting to 0 or less will disable | 0 |
| pwd_color_dirs | color of normal directories | 0087AF |
| pwd_unwritable_icon | symbol to display when the current directory is not writable by the user | '' #Lock icon |

View File

@ -1,6 +1,6 @@
function _tide_pwd
set -l truncatedPwd $_tide_pwd
set -g _tide_pwd_output $_tide_pwd
set -g _tide_pwd_output (set_color $tide_pwd_color_dirs)$_tide_pwd
if not test -w $PWD
set -p _tide_pwd_output (set_color $tide_pwd_color_dirs){$tide_pwd_unwritable_icon}

View File

@ -2,7 +2,7 @@ function _tide_pwd_var_change -v PWD
set -l preDirNumberPwd (string replace $HOME '~' $PWD)
set -l preDirNumberPwdSplit (string split --no-empty '/' $preDirNumberPwd)
set -g _tide_split_pwd $preDirNumberPwdSplit[(math -$tide_pwd_max_dirs)..-1]
set -g _tide_split_pwd $preDirNumberPwdSplit[(math -s0 -$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)