Changes method git_parse_ahead() on git.zsh lib file. Before this
change it checked directly against origin/master branch. Now it
uses $(current_branch) to check for not pushed changes against
the current remote branch.
Modifies the Git lib file (lib/git.zsh), adding three new prompt
methods:
- git_prompt_ahead(): Shows the content of the custom var
$ZSH_THEME_GIT_PROMPT_AHEAD if the local repository has
commits ahead from the remote origin repository
- git_prompt_short_sha(): Shows last commit SHA hash in short
mode wrapped between the content of the custom vars
$ZSH_THEME_GIT_PROMPT_SHA_BEFORE and
$ZSH_THEME_GIT_PROMPT_SHA_AFTER
- git_prompt_long_sha(): Shows last commit SHA hash in long
mode wrapped between the content of the custom vars
$ZSH_THEME_GIT_PROMPT_SHA_BEFORE and
$ZSH_THEME_GIT_PROMPT_SHA_AFTER
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)
Use /etc/hosts in addtion to $HOME/.ssh/known_hosts as the source for
hostname completion
Turn on completion caching to speed up certain comands
When completing usernames, don't include system accounts by default
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
The key here is not using MENU_COMPLETE which autoselects the first
entry, but using AUTO_MENU which displays the menu but autoselects
on successive tab hit.
Also, do not use zstyle menu yes because that somehow overrides
the setopts.