mirror of
https://github.com/meineerde/dotfiles.git
synced 2025-10-17 19:41:01 +00:00
Fix stupid string handling bug
This commit is contained in:
parent
1d0967f754
commit
9bf39f0c57
2
.bashrc
2
.bashrc
@ -179,7 +179,7 @@ PS1="${debian_chroot:+($debian_chroot)}"
|
||||
# Short PWD, if it's to long.
|
||||
short_pwd() {
|
||||
FIXED_PWD="${PWD/#$HOME/~}"
|
||||
if [[ ${#FIXED_PWD} -gt ${#PWD_LENGTH} ]]; then
|
||||
if [[ ${#FIXED_PWD} -gt $PWD_LENGTH ]]; then
|
||||
echo "${FIXED_PWD:0:$((4))}...${FIXED_PWD:$((${#PWD}-$PWD_LENGTH+7)):$(($PWD_LENGTH-7))}"
|
||||
else
|
||||
echo "$FIXED_PWD"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user