mirror of
https://github.com/IlanCosman/tide.git
synced 2024-09-11 09:05:37 +03:00
Minor edits
This commit is contained in:
parent
56a7054487
commit
5e614e460a
@ -1,15 +1,11 @@
|
||||
function _tide_item_cmd_duration
|
||||
if test $CMD_DURATION -gt $tide_cmd_duration_threshold
|
||||
set -l time (math --scale=0 "$CMD_DURATION/3600000" # Hours
|
||||
math --scale=0 "$CMD_DURATION/60000"%60 # Minutes
|
||||
math --scale=$tide_cmd_duration_decimals "$CMD_DURATION/1000"%60) # Seconds
|
||||
|
||||
if test $time[1] != 0
|
||||
_tide_print_item cmd_duration $tide_cmd_duration_icon' ' "$time[1]h $time[2]m $time[3]s"
|
||||
else if test $time[2] != 0
|
||||
_tide_print_item cmd_duration $tide_cmd_duration_icon' ' "$time[2]m $time[3]s"
|
||||
else
|
||||
_tide_print_item cmd_duration $tide_cmd_duration_icon' ' "$time[3]s"
|
||||
end
|
||||
test $CMD_DURATION -gt $tide_cmd_duration_threshold && time=(math --scale=0 "$CMD_DURATION/3600000" # Hours
|
||||
math --scale=0 "$CMD_DURATION/60000"%60 # Minutes
|
||||
math --scale=$tide_cmd_duration_decimals "$CMD_DURATION/1000"%60) if test $time[1] != 0
|
||||
_tide_print_item cmd_duration $tide_cmd_duration_icon' ' "$time[1]h $time[2]m $time[3]s"
|
||||
else if test $time[2] != 0
|
||||
_tide_print_item cmd_duration $tide_cmd_duration_icon' ' "$time[2]m $time[3]s"
|
||||
else
|
||||
_tide_print_item cmd_duration $tide_cmd_duration_icon' ' "$time[3]s"
|
||||
end
|
||||
end
|
||||
|
@ -11,9 +11,9 @@ function _tide_pwd
|
||||
|
||||
# Anchor first and last directories (which may be the same)
|
||||
if test -n "$split_pwd[1]" # ~/foo/bar, hightlight ~
|
||||
set split_pwd_for_output "$_tide_reset_to_color_dirs$icon"$_tide_color_anchors$split_pwd[1]$_tide_reset_to_color_dirs $split_pwd[2..]
|
||||
set -f split_pwd_for_output "$_tide_reset_to_color_dirs$icon"$_tide_color_anchors$split_pwd[1]$_tide_reset_to_color_dirs $split_pwd[2..]
|
||||
else # /foo/bar, hightlight foo not empty string
|
||||
set split_pwd_for_output "$_tide_reset_to_color_dirs$icon" $_tide_color_anchors$split_pwd[2]$_tide_reset_to_color_dirs $split_pwd[3..]
|
||||
set -f split_pwd_for_output "$_tide_reset_to_color_dirs$icon" $_tide_color_anchors$split_pwd[2]$_tide_reset_to_color_dirs $split_pwd[3..]
|
||||
end
|
||||
set split_pwd_for_output[-1] $_tide_color_anchors$split_pwd[-1]$_tide_reset_to_color_dirs
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user