Use GNU stow to manage symlinks
This commit is contained in:
parent
e395c6d49b
commit
4e5e48c64a
19 changed files with 13 additions and 30 deletions
30
zsh/.zsh/prompt
Normal file
30
zsh/.zsh/prompt
Normal file
|
@ -0,0 +1,30 @@
|
|||
local current_time="[%B%D{%T}%b]"
|
||||
local current_dir='%B%F{blue}%~%f%b'
|
||||
|
||||
# user
|
||||
local user="%F{green}%n%f"
|
||||
|
||||
# host
|
||||
local host=""
|
||||
if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then
|
||||
host='%F{yellow}%M%f' #SSH
|
||||
else
|
||||
host='%F{green}%M%f' # no SSH
|
||||
fi
|
||||
|
||||
# vcs
|
||||
precmd() {
|
||||
setopt promptsubst
|
||||
autoload -Uz vcs_info
|
||||
|
||||
zstyle ':vcs_info:*' enable git hg svn
|
||||
zstyle ':vcs_info:*:prompt:*' nvcsformats ""
|
||||
zstyle ':vcs_info:*:prompt:*' formats "[%F{cyan}%b%f%u%c]"
|
||||
vcs_info 'prompt'
|
||||
}
|
||||
local vcs='${vcs_info_msg_0_}'
|
||||
|
||||
local prompt="%B%(?.%F{green}✓%b.%F{red}✗)%b%f"
|
||||
|
||||
PROMPT="${current_time} ${user}@${host} ${current_dir} ${vcs}
|
||||
$prompt "
|
Loading…
Add table
Add a link
Reference in a new issue