From 3803d38c1a87665afc89756850061466b6cde966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Wed, 22 Apr 2026 17:38:19 +0200 Subject: [PATCH] fix hostname length --- private_dot_config/zsh/dot_zshrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/private_dot_config/zsh/dot_zshrc b/private_dot_config/zsh/dot_zshrc index 2f6c8c5..05f89bf 100644 --- a/private_dot_config/zsh/dot_zshrc +++ b/private_dot_config/zsh/dot_zshrc @@ -115,13 +115,15 @@ POWERLINE_STOP="\ue0b4" POWERLINE_STOP_INV="\ue0b6" PROMPT_ENTER="" #"\ueb70" PROMPT_PAD="." -PROMPT_EXTRA_WIDTH=73 +PROMPT_EXTRA_WIDTH=66 precmd() { if [ -z ${STARTCMD_TS+x} ]; then STARTCMD_TS=$(date +%s%N) fi local prompt_ln="${#${${PWD}/${HOME}/~}}" # len of path where $HOME is susbtiued by ~ (and is counted as 1) + local hn=$(hostname) + prompt_ln=$((prompt_ln + ${#hn})) if (($COLUMNS > PROMPT_EXTRA_WIDTH + prompt_ln)); then local exec_ts=$(($(date +%s%N) - STARTCMD_TS))