Commit Graph

24 Commits

Author SHA1 Message Date
Jingwen Owen Ou
dc9e1764cf Fix missing add-zsh-hook
In older version of zsh, `add-zsh-hook` is not available, causing issues like:

```
/Users/hugo/.oh-my-zsh/lib/termsupport.zsh:32: add-zsh-hook: function definition file not found
/Users/hugo/.oh-my-zsh/lib/termsupport.zsh:33: add-zsh-hook: function definition file not found
```

See https://github.com/robbyrussell/oh-my-zsh/issues/748. This patch pulls in the changes suggested in https://github.com/robbyrussell/oh-my-zsh/issues/748#issuecomment-37862691 by @mcornella and I have tested it on RHEL 5.
2014-08-22 15:59:17 -07:00
Marc Cornellà
5137e0e509 Escape % in $CMD variable
Fixes formatting on some rare cases when a percent ends up
in the $CMD variable, like these below:

- When assigning a variable, $CMD ends up with the second parameter;
in this case, $CMD will contain '+%s%N', messing with the syntax:

 $ a=`date +%s%N`

- A function (or command in general) that contains a percent symbol:

 $ to\%() { echo $(( $1 * 100 / $3))\% } # $CMD=to%()
 $ to% 2 of 10 # $CMD=to%
2014-03-25 21:14:20 +01:00
Marc Cornellà
a951600b4e Avoid 'title:parse error' with single quotes in $CMD
Fixes #2182
2014-02-21 22:16:12 +01:00
Marc Cornellà
3e5de21dc5 Revert previous commit, escape % 2014-02-21 22:16:12 +01:00
Marc Cornellà
b73ced397f Use single quotes also in $LINE definiton 2014-02-21 22:16:12 +01:00
Marc Cornellà
b0fbe0d11a Avoid evaluating special chars in $LINE on title command (fixes #2234) 2014-02-21 22:16:12 +01:00
Ehren Kret
ab7604e5c2 Escape both % and $ in the command line
Fixes issue #1884
2013-06-11 11:37:35 -07:00
Swanand Pagnis
fb3dc24ff4 Support for opening tabs and windows in the same This fixed #1498 for me on Mountain Lion 2013-02-14 14:07:58 +05:30
Robby Russell
c5ecb4e136 Fixes #1489
Revert "Fixed Mac OS X Terminal.app related issue with extra newlines being printed out sometimes"

This reverts commit 8f89d4d5a5.
2012-12-31 05:25:07 -08:00
Robby Russell
d88fad3392 Merge pull request #880 from darrenclark/fix-mac-terminal-app-echo-issue
Fixed Mac OS X Terminal.app related issue with extra newlines echoed
2012-12-04 06:45:01 -08:00
Trae Robrock
fe094712fb resolving conflict in termsupport plugin 2012-12-02 12:30:46 -08:00
Markus Scherer
43bd46b780 fix title setting bug in xterm and urxvt
Before this patch, commands containing %-signs set the title wrong
(urxvt and xterm) [1] and produce strange output in urxvt [2].

test for bug 1:
> sleep 10 && echo %
sets title to "sleep 10 && echo %<<"
> sleep 10 && echo %f
doesn't change the title at all

test for bug 2 (only urxvt):
> echo %f
39m%f
^^^^^----- output
2012-10-03 17:18:14 +02:00
Jeffrey Dileo
c7105a5341 Disabled title function for emacs term mode 2012-03-07 07:47:34 -05:00
Darren Clark
8f89d4d5a5 Fixed Mac OS X Terminal.app related issue with extra newlines being printed out sometimes 2012-01-27 01:20:06 -07:00
Christian Höltje
40c47a7375 lib/termsupport now uses add-zsh-hook
This is needed to play nice with plugins that need various hooks.
2011-11-15 01:14:03 -05:00
Renaud (Nel) Morvan
e3cede37a0 Relax pattern matching on TERM. Closes #320. 2011-05-02 13:51:16 +02:00
Renaud (Nel) Morvan
0cc0915bf8 Refactor DISABLE_AUTO_TITLE to be more DRY 2011-04-04 14:02:50 +02:00
Renaud (Nel) Morvan
a3e92892bb Command title behavior no longer depend on local zsh configuration
Fix by derekjw. closes #52.
2011-04-04 13:56:00 +02:00
Renaud (Nel) Morvan
d138751cbd Escape characters used in escape sequence to avoid triggering bugs in Apple Terminal
Closes #45 #57 #58 #86.
2011-04-04 13:49:02 +02:00
Lorrin Nelson
06063ab695 Introduce DISABLE_AUTO_TITLE option 2011-03-23 21:20:08 -07:00
Robby Russell
52df85440e Revert "Re-order title/tab setting to make window titles work on OSX terminal which"
Was causing iTerm title to disappear entirely..

This reverts commit d4ea399b04.
2011-03-16 12:20:35 -07:00
Matt Cable
d4ea399b04 Re-order title/tab setting to make window titles work on OSX terminal which
doesn't support tabs titles.
2011-03-13 17:11:32 -06:00
Renaud (Nel) Morvan
faac3ba8fc Refactor window and tab title in tty
Term window title and tab title are now skinable
Tab title can be different from window title (when supported by term)
Default theme is optimized of usuability (no %u@%m: $~ in a 10 char tab)
Cleanup code duplication and add comment for supported terms
On osX it works great on iterm, and is decent once you tweak Terminal pref
Tested under GNU screen, iTerm and Apple Terminal, need to be tested on linux
TODO implement Konsole support (via dbus)
2011-01-30 09:19:47 +01:00
James Cox
f363c025da put everything in lib 2009-09-23 16:14:43 +01:00