[zsh] Update all init-rc functions
This commit is contained in:
parent
1145ef23e1
commit
be4d690e32
16 changed files with 148 additions and 161 deletions
29
zsh/func/init-rc-prompt
Normal file
29
zsh/func/init-rc-prompt
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env zsh
|
||||
# Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
function init-rc-prompt
|
||||
{
|
||||
local theme=loquacious
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
autoload -Uz vcs_info
|
||||
|
||||
zstyle ':vcs_info:*' disable p4 bzr cdv darcs mtn svk tla cvs svn
|
||||
zstyle ':vcs_info:*' enable git
|
||||
zstyle ':vcs_info:git:general:*' formats '%b'
|
||||
zstyle ':vcs_info:git-svn:general:*' formats '%b'
|
||||
|
||||
# Export the current Git branch before every prompt.
|
||||
function _export-gitbranch {
|
||||
vcs_info general
|
||||
export gitbranch=${vcs_info_msg_0_}
|
||||
}
|
||||
|
||||
add-zsh-hook precmd _export-gitbranch
|
||||
|
||||
autoload -U promptinit
|
||||
promptinit
|
||||
prompt $theme
|
||||
}
|
||||
|
||||
init-rc-prompt "$@"
|
Loading…
Add table
Add a link
Reference in a new issue