Closed Wuestengecko closed 5 years ago
The dir segment replaces $HOME anywhere in the current working directory's path, not just at the beginning.
dir
$HOME
I just noticed this, and have not yet done anything in order to fix it.
The quick and easy fix for this is to change line 800 (or the segment's line 54 on next) to
next
... && current_path=${current_path/#$HOME/"~"}
(notice the # before $HOME). This will make above screenshot keep ~ instead of /root, but leave /mnt/root as-is.
#
~
/root
/mnt/root
This information will help us understand your configuration.
zsh 5.7 (x86_64-pc-linux-gnu)
v0.6.6
master
kitty
Good finding @Wuestengecko . Would you create a PR for that? That would be awesome!
Describe Your Issue
The
dir
segment replaces$HOME
anywhere in the current working directory's path, not just at the beginning.Have you tried to debug or fix it?
I just noticed this, and have not yet done anything in order to fix it.The quick and easy fix for this is to change line 800 (or the segment's line 54 on
next
) to(notice the
#
before$HOME
). This will make above screenshot keep~
instead of/root
, but leave/mnt/root
as-is.Environment Information
This information will help us understand your configuration.
zsh 5.7 (x86_64-pc-linux-gnu)
v0.6.6
, also reproduced onmaster
andnext
kitty