fix .bashrc: no bin file tput 則略過畫線功能
This commit is contained in:
parent
c4c518707f
commit
1384a71ddd
@ -197,9 +197,11 @@ function __pb10k_top {
|
|||||||
[ "$info" != "" ] && __pb10k_top_right_parse "$info"
|
[ "$info" != "" ] && __pb10k_top_right_parse "$info"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if command -v tput &> /dev/null; then
|
||||||
[ "$__TOP_RIGHT_LEN" -gt 0 ] && __TOP_RIGHT_LEN=$(( __TOP_RIGHT_LEN - 1 ))
|
[ "$__TOP_RIGHT_LEN" -gt 0 ] && __TOP_RIGHT_LEN=$(( __TOP_RIGHT_LEN - 1 ))
|
||||||
cursor_adjust="\033[${__TOP_RIGHT_LEN}D"
|
cursor_adjust="\033[${__TOP_RIGHT_LEN}D"
|
||||||
__TOP_LEFT+="$cursor_adjust"
|
__TOP_LEFT+="$cursor_adjust"
|
||||||
|
fi
|
||||||
|
|
||||||
printf "%s%s" "$__TOP_LEFT" "$__TOP_RIGHT"
|
printf "%s%s" "$__TOP_LEFT" "$__TOP_RIGHT"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user