fix hostname length
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user