zsh: add w3 alias, git branch on prompt

This commit is contained in:
Jason Swank 2023-12-01 12:12:45 -05:00
parent 9dcf90c0bf
commit 8a6cdbb2e2

View File

@ -3,6 +3,7 @@ alias mailx='/usr/local/bin/mailx'
alias grep='grep --color'
alias vim='nvim'
alias vi='nvim'
alias w3='w3m -T text/html'
# allow for # to be interpreted as a comment on the command line
setopt interactivecomments
@ -39,6 +40,18 @@ if [ -e $HOME/.asdf/asdf.sh ]; then
fpath=(${ASDF_DIR}/completions $fpath)
fi
# git branch prompt
setopt prompt_subst
autoload -Uz vcs_info
zstyle ':vcs_info:*' actionformats \
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
zstyle ':vcs_info:*' formats \
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f '
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
zstyle ':vcs_info:*' enable git cvs svn
# Better SSH/Rsync/SCP Autocomplete
#zstyle ':completion:*:(scp|rsync):*' tag-order ' hosts:-ipaddr:ip\ address hosts:-host:host files'
#zstyle ':completion:*:(ssh|scp|rsync):*:hosts-host' ignored-patterns '*(.|:)*' loopback ip6-loopback localhost ip6-localhost broadcasthost