Commit Graph

57 Commits

Author SHA1 Message Date
Jeremy Armstrong
8aa8405ea2 termsupport: add support for tmux* $TERM values (#7622) 2019-03-21 20:41:55 +01:00
Janosch Schwalm
19b925e741 use https everywhere (#6574)
* use https everywhere

* use https links on the files that are left

Also, removed some broken links and updated redirections.
2018-08-07 20:42:01 +02:00
moyamo
71deb74552 Fix indentation 2015-12-14 13:05:51 +02:00
moyamo
d779750341 Default to using terminfo to set the terminal title
Currently, the title is only set on supported terminals (i.e. xterm,
urxvt, screen etc.). Using terminfo entries to set the terminal title
adds support for many more terminals.
2015-12-14 12:59:04 +02:00
Marc Cornellà
4e306887c2 Cleanup update_terminalapp_cwd function 2015-12-01 14:05:38 +01:00
Marc Cornellà
eca912e51a Quote all variables in if statements 2015-12-01 14:05:18 +01:00
Marc Cornellà
103eb32721 Use a case structure to id terminal types 2015-12-01 14:04:12 +01:00
Dawid Ferenczy
63d7500cf1 Added setting of the window title in Cygwin 2015-12-01 13:52:52 +01:00
Ionel Cristian Mărieș
d55111f200 Support all kinds of putty-like terminal strings. 2015-12-01 00:59:35 +02:00
Ionel Cristian Mărieș
711c1bcb40 Add support for "putty" $TERM in termsupport.zsh 2015-11-30 15:16:47 +02:00
Andrew Janke
f0981d564a termsupport: protect subshell with quotes 2015-11-27 15:58:06 +01:00
Andrew Janke
00eb465830 Merge branch 'master' into fold-terminalapp-plugin-into-termsupport 2015-08-17 20:59:39 -04:00
Andrew Janke
47d19cc564 Add defensive emulate -L zsh to termsupport functions 2015-08-17 20:55:41 -04:00
Robby Russell
7c60da9e1f Merge pull request #4233 from apjanke/apple-term-no-dupe-folder-in-title
termsupport: avoid repeated dir in window title in Terminal.app
2015-08-12 21:15:59 -07:00
Robby Russell
f6a2b97356 Merge pull request #4203 from apjanke/title-protect-promptsubst
termsupport: protect title() with `emulate -L zsh` for portability
2015-08-12 21:12:21 -07:00
Robby Russell
d1ea849fdd Merge pull request #2106 from adepasquale/master
Added ssh-like mosh window title
2015-08-12 21:01:00 -07:00
Andrew Janke
14b4ba83c3 Move urlencode/urldecode functions to core lib 2015-08-09 16:28:47 -04:00
Andrew Janke
17da983442 termsupport: avoid repeated dir in window title in Terminal.app 2015-08-09 15:15:12 -04:00
Andrew Janke
90ea67edf0 termsupport: protect title() with emulate -L zsh
This prevents it from malfunctioning when `setopt prompt_subst` is off.
2015-07-31 22:23:12 -04:00
Andrew Janke
88f42b6132 Add support for variant "utf8" locale suffix spelling. Fix dumb bug in iconv call that would cause it to hang. 2015-02-21 16:25:28 -05:00
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
Andrea De Pasquale
12324856c6 Added ssh-like mosh window title
Display the hostname when running Mosh (http://mosh.mit.edu/).
Same thing as displaying "hostname" when running "ssh hostname".
2014-06-05 23:27:59 +02: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