vte.sh sometimes hangs
Submitted by Leo..@..ky.com
Link to original bug (#720241)
Description
Sometimes when I manually source /etc/profile, it get stuck (hangs). Running "set -xv; . /etc/profile", I've got:
..... ..... unset sh [[ -z "$BASH_SOURCE" && ($BASH_COMMAND != prompt_command_function) ]] && set_shell_label $BASH_COMMAND +++ [[ -z /etc/profile ]] ++ unset sh __vte_prompt_command [[ -z "$BASH_SOURCE" && ($BASH_COMMAND != prompt_command_function) ]] && set_shell_label $BASH_COMMAND +++ [[ -z '' ]] +++ [[ __vte_prompt_command != prompt_command_function ]] +++ set_shell_label __vte_prompt_command +++ [[ -n '' ]] +++ case $TERM in +++ xterm_label ' __vte_prompt_command' +++ local 'args= __vte_prompt_command' +++ echo -n '' ++ __vte_prompt_command __vte_osc7)" __vte_osc7) __vte_osc7 +++ __vte_osc7 __vte_urlencode "${PWD}")" __vte_urlencode "${PWD}") __vte_urlencode "${PWD}" ++++ __vte_urlencode /tmp ++++ LC_ALL=C ++++ str=/tmp ++++ '[' -n /tmp ']' ++++ safe=/tmp ++++ printf %s /tmp ++++ str= ++++ '[' -n '' ']' ++++ '[' -n '' ']' +++ printf '\033]7;file://%s%s\a' ahp /tmp ++ printf '\033]0;%s@%s:%s\007%s' lvv ahp /tmp ''
So, bash stuck in vte.sh. It seams vte could not digest some escape sequence for window title. Initially I thought that it was conflict of vte.sh with git-prompt (http://github.com/lvv/git-prompt). But removing git-prompt I was still getting this hang.
Now on my computer: bash, my distro, and now VTE is trying to set my prompt. Even though I have already carefully constructed PS1 and PROMPT_COMMAND. Please dont' do this. Or at least check if PROMPT_COMMAND is already set with something like this:
[ -n "$PROMPT_COMMAND" ] || return 0
Version: 0.34.x
Resolution: RESOLVED INVALID