Commit graph

36 commits

Author SHA1 Message Date
Andrew Janke cb37c934c0 Remove unnecessary braces. 2015-02-21 16:00:40 -05:00
Andrew Janke 187cf07c91 For unspecified encodings, assume it's UTF-8 or compatible (e.g. ASCII) and muddle through without character encoding conversion. 2015-02-17 00:54:54 -05:00
Andrew Janke 702ff1ca91 Add support for non-UTF-8 encodings in caller's locale. 2015-02-17 00:49:53 -05:00
Andrew Janke 3a18c33f17 In termsupport, use LC_CTYPE instead of LANG to enable byte-by-byte text processing. LANG doesn't seem to actually work. 2015-02-14 20:30:03 -05:00
Andrew Janke a9e97e5d2d Remove terminalapp plugin and fold its implementation in to lib/termsupport.zsh. Replaces the redundant Terminal.app support that was recently added to termsupport. 2015-02-14 19:05:27 -05:00
Marc Cornellà 3704fbb71e Extract CWD notifier back out of auto-title hooks 2015-02-13 15:57:18 +01:00
Marc Cornellà 2e41d06b76 Use quoted $TERM value everywhere 2015-02-10 19:53:40 +01:00
Marc Cornellà b7e5dd35ef Quick-fix code style 2015-02-10 19:52:58 +01:00
Andrew Janke 4fc6dccb42 term: Move DISABLE_AUTO_TITLE check to hooks
Move the DISABLE_AUTO_TITLE check from title() to the preX hook
functions that call it, to allow the title() function to be used
directly by user or other callers.
2015-02-10 19:38:11 +01:00
Andrew Janke be7028012e Reword comments on termsupport internal functions. 2015-02-04 01:00:51 -05:00
Andrew Janke 5f79ab5547 Move chpwd update output from chpwd hook to precmd to avoid
contaminating script/function output
2015-01-27 21:00:07 -06:00
Andrew Janke 7295e38885 termsupport: add chpwd hook for setting pwd in Apple Terminal.app 2014-12-21 15:05:22 -05:00
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
Renamed from xterms.zsh (Browse further)