diff options
author | Leonid Volnitsky <Leonid@Volnitsky.com> | 2011-08-27 22:44:38 +0300 |
---|---|---|
committer | Leonid Volnitsky <Leonid@Volnitsky.com> | 2011-08-27 22:44:38 +0300 |
commit | ecd0a5e3a7733be761f37867a22f0123b1595317 (patch) | |
tree | 5398c52520b62326ca80f2f2a04def6525dc1dcd | |
parent | reverted accidantal merge of remote-watch (diff) | |
download | git-prompt-ecd0a5e3a7733be761f37867a22f0123b1595317.tar.gz git-prompt-ecd0a5e3a7733be761f37867a22f0123b1595317.tar.bz2 git-prompt-ecd0a5e3a7733be761f37867a22f0123b1595317.zip |
fixes: Issue #15 -- truncates shall label to 200 chars
-rwxr-xr-x | git-prompt.sh | 5 |
1 files changed, 4 insertions, 1 deletions
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?) |