Marc Cornellà
3704fbb71e
Extract CWD notifier back out of auto-title hooks
11 years ago
Marc Cornellà
2e41d06b76
Use quoted $TERM value everywhere
11 years ago
Marc Cornellà
b7e5dd35ef
Quick-fix code style
11 years ago
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.
11 years ago
Andrew Janke
be7028012e
Reword comments on termsupport internal functions.
11 years ago
Andrew Janke
5f79ab5547
Move chpwd update output from chpwd hook to precmd to avoid
...
contaminating script/function output
11 years ago
Andrew Janke
7295e38885
termsupport: add chpwd hook for setting pwd in Apple Terminal.app
11 years ago
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.
12 years ago
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%
12 years ago
Marc Cornellà
a951600b4e
Avoid 'title:parse error' with single quotes in $CMD
...
Fixes #2182
12 years ago
Marc Cornellà
3e5de21dc5
Revert previous commit, escape %
12 years ago
Marc Cornellà
b73ced397f
Use single quotes also in $LINE definiton
12 years ago
Marc Cornellà
b0fbe0d11a
Avoid evaluating special chars in $LINE on title command ( fixes #2234 )
12 years ago
Ehren Kret
ab7604e5c2
Escape both % and $ in the command line
...
Fixes issue #1884
13 years ago
Swanand Pagnis
fb3dc24ff4
Support for opening tabs and windows in the same This fixed #1498 for me on Mountain Lion
13 years ago
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 .
13 years ago
Trae Robrock
fe094712fb
resolving conflict in termsupport plugin
14 years ago
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
14 years ago
Jeffrey Dileo
c7105a5341
Disabled title function for emacs term mode
14 years ago
Darren Clark
8f89d4d5a5
Fixed Mac OS X Terminal.app related issue with extra newlines being printed out sometimes
14 years ago
Christian Höltje
40c47a7375
lib/termsupport now uses add-zsh-hook
...
This is needed to play nice with plugins that need various hooks.
15 years ago
Renaud (Nel) Morvan
e3cede37a0
Relax pattern matching on TERM. Closes #320 .
15 years ago
Renaud (Nel) Morvan
0cc0915bf8
Refactor DISABLE_AUTO_TITLE to be more DRY
15 years ago
Renaud (Nel) Morvan
a3e92892bb
Command title behavior no longer depend on local zsh configuration
...
Fix by derekjw. closes #52 .
15 years ago
Renaud (Nel) Morvan
d138751cbd
Escape characters used in escape sequence to avoid triggering bugs in Apple Terminal
...
Closes #45 #57 #58 #86 .
15 years ago
Lorrin Nelson
06063ab695
Introduce DISABLE_AUTO_TITLE option
15 years ago
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 .
15 years ago
Matt Cable
d4ea399b04
Re-order title/tab setting to make window titles work on OSX terminal which
...
doesn't support tabs titles.
15 years ago
Fredrik Appelberg
d807221f60
fix to avoid parse errors if $TERM is empty
15 years ago
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)
15 years ago
Robby Russell
c620408962
Revert "Added my prompt theme, with a tweak to the core oh-my-zsh to support it. My git_prompt_info function not only reports the branch and dirty status, but also whether or not the branch is ahead or behind of the remote, or both. It also switches the prompt colour from green to red if the previous command exited with a non-zero value (i.e. failed)."
...
This reverts commit 14a1ce80bb .
17 years ago
James Adam
14a1ce80bb
Added my prompt theme, with a tweak to the core oh-my-zsh to support it. My git_prompt_info function not only reports the branch and dirty status, but also whether or not the branch is ahead or behind of the remote, or both. It also switches the prompt colour from green to red if the previous command exited with a non-zero value (i.e. failed).
17 years ago
James Cox
f363c025da
put everything in lib
17 years ago
James Cox
89d86d869c
some todo notes, take @chris2's titlebar improvements and poke at completions
17 years ago
James Cox
2b61a2aa3a
add in xterms / title hacks
17 years ago