blob: 12a07334b6912afc6ddccee235b042b0caef39fe (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# -*- mode: sh -*-
# vim: ft=zsh
# a prompt meant to imitate fish's default prompt
# it's not meant to be too close necessarily, just same feel overall,
# while being a minimal/cheap implementation
setopt promptsubst
# make sure you configure vcs_info!
# TODO: this doesn't seem to consistently run just after starting, why?
autoload -RUz add-zsh-hook
add-zsh-hook -Uz precmd vcs_info
local login='%(!.%F{red}.%F{green})%n%f@%m'
local vcsinfo='${vcs_info_msg_0_:+ $vcs_info_msg_0_}'
local returnc='%(0?.. %F{red}[%?]%f)'
local separator='%(!.#.>)'
PS1="$login %~$vcsinfo$returnc$separator "
|