mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
Merge dc8b99cabe into 62cf1201b0
This commit is contained in:
commit
1d21ad5106
1 changed files with 1 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ function theme_precmd {
|
||||||
local promptsize=${#${(%):---(%n@%m:%l)---()--}}
|
local promptsize=${#${(%):---(%n@%m:%l)---()--}}
|
||||||
local rubypromptsize=${#${(%)$(ruby_prompt_info)}}
|
local rubypromptsize=${#${(%)$(ruby_prompt_info)}}
|
||||||
local pwdsize=${#${(%):-%~}}
|
local pwdsize=${#${(%):-%~}}
|
||||||
|
pwdsize=$(($pwdsize * 3 - ${#${(ml[$pwdsize * 2])${(%):-%~}}}))
|
||||||
|
|
||||||
# Truncate the path if it's too long.
|
# Truncate the path if it's too long.
|
||||||
if (( promptsize + rubypromptsize + pwdsize > TERMWIDTH )); then
|
if (( promptsize + rubypromptsize + pwdsize > TERMWIDTH )); then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue