• Brandon Philips's avatar
    functions: fix title() to not match any $TERM · aab235f6
    Brandon Philips authored
    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: 's avatarBrandon Philips <brandon@ifup.org>
    
    openSUSE running zsh 4.3.10
    aab235f6
Name
Last commit
Last update
..
aliases.zsh Loading commit data...
appearance.zsh Loading commit data...
completion.zsh Loading commit data...
correction.zsh Loading commit data...
directories.zsh Loading commit data...
functions.zsh Loading commit data...
git.zsh Loading commit data...
grep.zsh Loading commit data...
history.zsh Loading commit data...
key-bindings.zsh Loading commit data...
misc.zsh Loading commit data...
rvm.zsh Loading commit data...
spectrum.zsh Loading commit data...
termsupport.zsh Loading commit data...