Explorar el Código

Support quoting behavior of bash 4.3+

bash 4.2 will print literal tilde, which seems like least evil.
Alois Mahdal hace 10 años
padre
commit
cbf3a65fa8
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3
    3
      dotfiles/bash/post.bashrc

+ 3
- 3
dotfiles/bash/post.bashrc Ver fichero

57
     xterm*|rxvt*|screen*)
57
     xterm*|rxvt*|screen*)
58
         test -n "$SSH_CONNECTION" \
58
         test -n "$SSH_CONNECTION" \
59
          && __host_id="${HOSTNAME%%.*}:"      # i.e. a remote session
59
          && __host_id="${HOSTNAME%%.*}:"      # i.e. a remote session
60
-        PROMPT_COMMAND='__save_rv $?; echo -ne "\033]0;$(__make_ps1d)$__host_id${PWD/$HOME/~}\$\007"'
60
+        PROMPT_COMMAND='__save_rv $?; echo -ne "\033]0;$(__make_ps1d)$__host_id${PWD/$HOME/\~}\$\007"'
61
 
61
 
62
         # Show the currently running command in the terminal title:
62
         # Show the currently running command in the terminal title:
63
         # http://www.davidpashley.com/articles/xterm-titles-with-bash.html
63
         # http://www.davidpashley.com/articles/xterm-titles-with-bash.html
71
                     # output them.
71
                     # output them.
72
                     ;;
72
                     ;;
73
                 "")
73
                 "")
74
-                    echo -ne "\033]0;$(__make_ps1d)$__host_id${PWD/$HOME/~}\$\007"
74
+                    echo -ne "\033]0;$(__make_ps1d)$__host_id${PWD/$HOME/\~}\$\007"
75
                     ;;
75
                     ;;
76
                 *)
76
                 *)
77
-                    echo -ne "\033]0;${BASH_COMMAND} ($__host_id${PWD/$HOME/~})\007"
77
+                    echo -ne "\033]0;${BASH_COMMAND} ($__host_id${PWD/$HOME/\~})\007"
78
                     ;;
78
                     ;;
79
             esac
79
             esac
80
         }
80
         }