From ecd0a5e3a7733be761f37867a22f0123b1595317 Mon Sep 17 00:00:00 2001 From: Leonid Volnitsky Date: Sat, 27 Aug 2011 22:44:38 +0300 Subject: fixes: Issue #15 -- truncates shall label to 200 chars --- git-prompt.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-prompt.sh b/git-prompt.sh index ee025a1..e851fd9 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -222,7 +222,10 @@ cwd_truncate() { set_shell_label() { - xterm_label() { echo -n "]2;${@}" ; } # FIXME: replace hardcodes with terminfo codes + xterm_label() { + local args="$*" + echo -n "]2;${args:0:200}" ; # FIXME: replace hardcodes with terminfo codes + } screen_label() { # FIXME: run this only if screen is in xterm (how to test for this?) -- cgit v1.2.3