[vte/vte-0-36] vte.sh: Fix tilde replacement for bash-4.3.
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-0-36] vte.sh: Fix tilde replacement for bash-4.3.
- Date: Tue, 9 Dec 2014 14:45:01 +0000 (UTC)
commit 48def907eadfc5200603ebded4fb99ff324e571e
Author: Colin Guthrie <colin mageia org>
Date: Wed Jul 23 22:44:40 2014 +0200
vte.sh: Fix tilde replacement for bash-4.3.
https://bugzilla.gnome.org/show_bug.cgi?id=733504
(cherry picked from commit f09439bf7d05cb81c37e3e1a8a4af71f489700ba)
src/vte.sh | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/vte.sh b/src/vte.sh
index 3b57f83..95d20c7 100644
--- a/src/vte.sh
+++ b/src/vte.sh
@@ -50,7 +50,9 @@ __vte_osc7 () {
}
__vte_prompt_command() {
- printf "\033]0;%s %s:%s\007%s" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}" "$(__vte_osc7)"
+ local pwd='~'
+ [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/}
+ printf "\033]0;%s %s:%s\007%s" "${USER}" "${HOSTNAME%%.*}" "${pwd}" "$(__vte_osc7)"
}
case "$TERM" in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]