#fix: print current directory without par...

1 messages · Page 1 of 1 (latest)

subtle sandal
#

Thanks so much for the contribution! Yes this is a good place to ask, we'll take a look!

#

I've actually been seeing this issue too lately, this is great.

I am just a bit confused on what \w was supposed to do, @south stirrup do you know?

south stirrup
#
\w
    the value of the PWD shell variable ($PWD), with $HOME abbreviated with a tilde (uses the value of the PROMPT_DIRTRIM variable)
patent zinc
#

Yes thats it. It seems like not all versions of sh support it.

#

The sh shipped in alpine supports \w but not the sh shipped in debian images

subtle sandal
#

Does your PR work the same in sh and bash? Not sure if you tested it already.

south stirrup
#

Not sure if that PR will work as-is or if it'll just literally put $(pwd | sed "s|^$HOME|~|") in the prompt thinkies

patent zinc
#

I have not tested by building a new dagger engine but I have tested by setting the PS1 variable in multiple containers (alpine, debian, golang, ubuntu)