Minor edits

This commit is contained in:
Ilan Cosman 2021-09-26 18:14:26 -07:00
parent 70d232c20a
commit 6b26c69da8
2 changed files with 3 additions and 2 deletions

View File

@ -30,7 +30,7 @@ function _tide_pwd
else if test $pwd_length -gt $dist_btwn_sides
while math $truncation_length +1 | read -l truncation_length &&
string sub --length $truncation_length -- $dir_section | read -l truncated &&
test $truncated != $dir_section -a (count $parent_dir/$truncated*/) -gt 1
test $truncated != $dir_section -a (count $parent_dir/$truncated*/) != 1
end
set split_pwd_for_output[$i] $_tide_color_truncated_dirs$truncated$_tide_reset_to_color_dirs
string join / $split_pwd_for_output | string length --visible | read -g pwd_length

View File

@ -9,6 +9,7 @@ _tide_cache_variables
# The first element in $$_tide_prompt_var is right prompt
# All remaining ones are 'left' prompt (also upper right in 2-line prompts)
set -g _tide_prompt_var _tide_prompt_$fish_pid
set -U $_tide_prompt_var # So that if we erase $_tide_prompt_var, the bg job can't set a uvar
function _tide_refresh_prompt --on-variable $_tide_prompt_var
set -g _tide_self_repainting # prevents us from creating a second background job
@ -19,7 +20,7 @@ function fish_prompt
_tide_last_status=$status _tide_last_pipestatus=$pipestatus if not set -e _tide_self_repainting
jobs --query
fish --command "_tide_jobs_status=$status CMD_DURATION=$CMD_DURATION COLUMNS=$COLUMNS \
fish_bind_mode=$fish_bind_mode set -U $_tide_prompt_var (_tide_prompt)" &
fish_bind_mode=$fish_bind_mode set $_tide_prompt_var (_tide_prompt)" &
builtin disown
command kill $_tide_last_pid 2>/dev/null