mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-23 20:13:05 +03:00
Minor edits
This commit is contained in:
parent
06dc81c2bf
commit
56e80f1423
@ -1,9 +1,7 @@
|
||||
function _tide_item_jobs
|
||||
if test $_tide_jobs_number != 0
|
||||
if test "$tide_jobs_verbose" = true
|
||||
test $_tide_jobs_number != 0 && if test "$tide_jobs_verbose" = true
|
||||
_tide_print_item jobs $tide_jobs_icon' ' $_tide_jobs_number
|
||||
else
|
||||
_tide_print_item jobs $tide_jobs_icon
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -11,10 +11,7 @@ function _tide_item_pwd
|
||||
set splitPwdForOutput[1] $colorAnchors"$splitPwd[1]"$keepBackgroundColor$colorDirs
|
||||
set splitPwdForOutput[-1] $colorAnchors"$splitPwd[-1]"$keepBackgroundColor$colorDirs
|
||||
|
||||
set -l pwdMaxLength (math $COLUMNS -$tide_pwd_truncate_margin)
|
||||
|
||||
set -l i 1
|
||||
for dirSection in $splitPwd[2..-2]
|
||||
pwdMaxLength=(math $COLUMNS -$tide_pwd_truncate_margin) i=1 for dirSection in $splitPwd[2..-2]
|
||||
set -l parentDir (string join -- '/' $splitPwd[1..$i] | string replace '~' $HOME) # Use i from before increment
|
||||
|
||||
set i (math $i + 1) # This keeps us from using seq
|
||||
|
@ -1,10 +1,7 @@
|
||||
function _tide_item_virtual_env
|
||||
if set -l splitVirtualEnv (string split '/' "$VIRTUAL_ENV")
|
||||
# Avoid printing a generic name
|
||||
if contains -- $splitVirtualEnv[-1] virtualenv venv .venv env
|
||||
set -l splitVirtualEnv (string split '/' "$VIRTUAL_ENV") && if contains -- $splitVirtualEnv[-1] virtualenv venv .venv env
|
||||
_tide_print_item virtual_env $tide_virtual_env_icon' ' $splitVirtualEnv[-2]
|
||||
else
|
||||
_tide_print_item virtual_env $tide_virtual_env_icon' ' $splitVirtualEnv[-1]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -4,10 +4,7 @@ function _tide_prompt
|
||||
|
||||
test "$tide_prompt_add_newline_before" = true && echo
|
||||
|
||||
set -l leftPrompt (_tide_left_prompt)
|
||||
set -l rightPrompt (_tide_right_prompt)
|
||||
|
||||
if set -q leftPrompt[2] # If the prompt is two lines
|
||||
leftPrompt=(_tide_left_prompt) rightPrompt=(_tide_right_prompt) if set -q leftPrompt[2] # If the prompt is two lines
|
||||
set -l promptAndFrameColor (set_color $tide_prompt_frame_and_connection_color -b normal || echo)
|
||||
|
||||
if test "$tide_left_prompt_frame_enabled" = true
|
||||
|
Loading…
Reference in New Issue
Block a user