made more current
This commit is contained in:
28
noire-carnation/zshenv
Normal file
28
noire-carnation/zshenv
Normal file
@@ -0,0 +1,28 @@
|
||||
HISTFILE="$XDG_DATA_HOME/zsh/histfile"
|
||||
HISTSIZE=999999999
|
||||
SAVEHIST="$HISTSIZE"
|
||||
|
||||
# Key (zshmisc(1)):
|
||||
#
|
||||
# '%F{$color}$x%f': Change foreground color of $x to $color
|
||||
# '%B$x%b': Make $x bold
|
||||
# '%n': $USER
|
||||
# '%M': $HOST
|
||||
# '%1~': $PWD, but shows '~' if at $HOME
|
||||
# '%(?.#.%?)':
|
||||
# '%n(x.true.false)' evaluates ternary expression for condition x, where n
|
||||
# is an integer, by default '0':
|
||||
# '?': If the last command’s exit status was 0, true
|
||||
# '#': Prints literal '#' to the prompt
|
||||
# '[%?]': Prints the last exit status with literal brackets surrounding it
|
||||
|
||||
ERR='[%f%F{green}%?%f%F{blue}]%f'
|
||||
ERR_LINE="%(?.#.$ERR)"
|
||||
|
||||
LINE1='%F{blue}╭%f %B%F{blue}%n%f@%F{magenta}%M%f%b'
|
||||
LINE2='%F{blue}│%f %F{green}%B%0~%b%f'
|
||||
LINE3="%F{blue}╰─$ERR_LINE%f "
|
||||
|
||||
PS1="$(printf "%s\n%s\n%s" "$LINE1" "$LINE2" "$LINE3")"; export PS1
|
||||
|
||||
GPG_TTY="$(tty)"; export GPG_TTY
|
||||
Reference in New Issue
Block a user