mirror of
https://github.com/meineerde/dotfiles.git
synced 2025-10-17 19:41:01 +00:00
Off-by-one in __short_pwd for PS1
This commit is contained in:
parent
60197d6484
commit
5b8b5a1ae2
2
.bashrc
2
.bashrc
@ -327,7 +327,7 @@ ps1_ruby=' \[\e[0;34m\]$(__prompt_ruby_version)\[\e[00m\]'
|
||||
# Short PWD, if it's to long.
|
||||
__prompt_short_pwd() {
|
||||
local FIXED_PWD=${PWD#$HOME}
|
||||
if [ ${#FIXED_PWD} -le ${#PWD} ]; then
|
||||
if [ ${#FIXED_PWD} -lt ${#PWD} ]; then
|
||||
FIXED_PWD="~${FIXED_PWD}"
|
||||
else
|
||||
FIXED_PWD="${PWD}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user