FS#39543 - [bash] Bug in homedir-shortening in PROMPT_COMMAND set in bashrc
Attached to Project:
Arch Linux
Opened by ... (spider007) - Wednesday, 19 March 2014, 19:13 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Sunday, 23 March 2014, 11:37 GMT
Opened by ... (spider007) - Wednesday, 19 March 2014, 19:13 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Sunday, 23 March 2014, 11:37 GMT
|
Details
There is a bug in
https://projects.archlinux.org/svntogit/packages.git/tree/trunk/system.bashrc?h=packages/bash
The $PROMPT_COMMAND no longer shortens the homedir to tilde. The bug is in the replacement: $ echo ~/asdf /home/user/asdf $ echo ${PWD/#$HOME/~}/asdf /home/user/asdf The solution is to escape the replacement: $ echo ${PWD/#$HOME/\~}/asdf ~/asdf |
This task depends upon
Closed by Bartłomiej Piotrowski (Barthalion)
Sunday, 23 March 2014, 11:37 GMT
Reason for closing: Fixed
Additional comments about closing: bash 4.3-3
Sunday, 23 March 2014, 11:37 GMT
Reason for closing: Fixed
Additional comments about closing: bash 4.3-3
If you think this behaviour is sane regardless of the feature that was previously present; why would $PWD be subjected to a string-replacement in the bashrc file? I don't agree with you here; but the last argument could simply be $PWD if you're right