Public bug reported:

Noticed the bug on trusty, still present in 
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/vivid/vte3/vivid/view/head:/src/vte.sh

__vte_prompt_command():
"${PWD/#$HOME/~}"  needs to be
"${PWD/#$HOME/\~}"

because ${parameter/pattern/string} does tilde expansion on string.

  The bash man page looks like its trying to say that it doesn't happen, but it 
does.
      In  each  of  the  cases below, word is subject to tilde expansion, 
parameter expansion, command substitution, and arithmetic
       expansion.
Unlike the other things, e.g. ${parameter##word},  ${parameter/pattern/string} 
uses "string" instead of "word".

 Quoting with a \ should be fine, since quote-removal will get rid of it
even if they change the code to match the docs, and stop doing tilde
expansion on the replacement string.


 Also, this is really a separate bug, but /etc/profile.d/* doesn't get sourced 
by non-login shells.  This makes /etc/profile.d/vte.sh not very useful.  There 
really ought to be a similar directory for non-login shells.  bash-completion 
falls victim to this as well.

** Affects: vte3 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1398799

Title:
  /etc/profile.d/vte.sh: need to quote ~

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/vte3/+bug/1398799/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to