mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-23 12:03:48 +03:00
Minor edits
This commit is contained in:
parent
70d232c20a
commit
6b26c69da8
@ -30,7 +30,7 @@ function _tide_pwd
|
|||||||
else if test $pwd_length -gt $dist_btwn_sides
|
else if test $pwd_length -gt $dist_btwn_sides
|
||||||
while math $truncation_length +1 | read -l truncation_length &&
|
while math $truncation_length +1 | read -l truncation_length &&
|
||||||
string sub --length $truncation_length -- $dir_section | read -l truncated &&
|
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
|
end
|
||||||
set split_pwd_for_output[$i] $_tide_color_truncated_dirs$truncated$_tide_reset_to_color_dirs
|
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
|
string join / $split_pwd_for_output | string length --visible | read -g pwd_length
|
||||||
|
@ -9,6 +9,7 @@ _tide_cache_variables
|
|||||||
# The first element in $$_tide_prompt_var is right prompt
|
# The first element in $$_tide_prompt_var is right prompt
|
||||||
# All remaining ones are 'left' prompt (also upper right in 2-line prompts)
|
# All remaining ones are 'left' prompt (also upper right in 2-line prompts)
|
||||||
set -g _tide_prompt_var _tide_prompt_$fish_pid
|
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
|
function _tide_refresh_prompt --on-variable $_tide_prompt_var
|
||||||
set -g _tide_self_repainting # prevents us from creating a second background job
|
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
|
_tide_last_status=$status _tide_last_pipestatus=$pipestatus if not set -e _tide_self_repainting
|
||||||
jobs --query
|
jobs --query
|
||||||
fish --command "_tide_jobs_status=$status CMD_DURATION=$CMD_DURATION COLUMNS=$COLUMNS \
|
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
|
builtin disown
|
||||||
|
|
||||||
command kill $_tide_last_pid 2>/dev/null
|
command kill $_tide_last_pid 2>/dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user