1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-24 14:50:07 +00:00
ohmyzsh/lib
Brandon Philips aab235f612 functions: fix title() to not match any $TERM
On my linux virtual terminals, where TERM="linux", I was getting
annoying output that was messing up my prompt.

It turns out the title function was always matching on the elif
statement for xterm/rxvt no matter what and the linux vt doesn't know
what to do with the title special control sequence and thus was printing
out garbage.

Through experimentation I figured out that the || inside of the [[ ]]
did not work:

export TERM=linux
$ if [[ $TERM =~ "^xterm" || $TERM == "rxvt" ]]; then echo $TERM; fi
linux

$ if [[ $TERM =~ "^xterm" ]] || [[ $TERM == "rxvt" ]]; then echo $TERM; fi

Signed-off-by: Brandon Philips <brandon@ifup.org>

openSUSE running zsh 4.3.10
2010-10-08 22:55:09 -07:00
..
aliases.zsh Removing '.' alias as it is overwriting a bash/zsh feature. Closes #63 2010-08-24 11:08:20 -07:00
appearance.zsh parse error fix 2009-11-05 20:48:08 +01:00
completion.zsh Do not complete named-directories 2010-09-26 18:29:14 +02:00
correction.zsh Don't correct hpodder commands. 2010-06-05 23:23:53 +08:00
directories.zsh put everything in lib 2009-09-23 16:14:43 +01:00
functions.zsh functions: fix title() to not match any $TERM 2010-10-08 22:55:09 -07:00
git.zsh Moving current_branch() to git plugin 2010-06-03 12:56:11 -07:00
grep.zsh Moving all zsh config options into a lib/ subdirectory to make way for some upcoming changes to directory structure and configuration options 2009-09-23 07:43:36 -07:00
history.zsh Ignore commands that start with a space. 2010-06-05 23:22:57 +08:00
key-bindings.zsh Merge branch 'shifttab' of http://github.com/kremso/oh-my-zsh into kremso-shifttab 2010-09-30 20:48:10 -07:00
misc.zsh Joined the appearance so the theme can apply LSCOLORS too 2009-11-04 20:37:18 +01:00
rvm.zsh Import rvm prompt 2010-05-28 08:13:17 +08:00
spectrum.zsh escape sequences so rprompt doesn't mess up 2010-05-06 20:46:32 -07:00
termsupport.zsh 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)." 2009-11-09 07:33:51 -08:00