Repository navigation
Match the whole real home directory in prompt_pwd. - #2283
Conversation
|
I believe the intended behavior is I think the problem is in the |
I don't think so - a "-" only has special meaning inside "[" and "]" when it's not on the first position. You can also reproduce the issue if you make a directory named "$HOMEtest" i.e. something like "/home/treetest". That also goes wrong because the original expression only looks for $HOME at the beginning of the string, not that it's actually referring to the actual $HOME directory. |
|
As noted in the comments, the old did never substitute. Managed with two expressions, not sure how to only use one? @lledey I don't think that's right? Now it should only match the correct home directory and substitute. Now actually substitutes correctly: |
|
Ooooh, you're right, I didn't understand the problem well, sorry |
|
This works and I can't figure out how to do it in one expression - I can't get a character group that means "/ or end of line". So I'm merging this. Thanks for your contribution! |
Match the whole real home directory in prompt_pwd.
This fixes a bug where only the prefix of the home directory is matched.
Current behavior:
And the fixed behavior: