Skip to content

Instantly share code, notes, and snippets.

@ppartarr
Last active May 12, 2021 07:49
Show Gist options
  • Save ppartarr/6eeb9585dcbc3c6a8db79982ec8c21ad to your computer and use it in GitHub Desktop.
Save ppartarr/6eeb9585dcbc3c6a8db79982ec8c21ad to your computer and use it in GitHub Desktop.
zsh haskell theme
function zle-line-init zle-keymap-select {
PROMPT='%{$fg_bold[green]%}λ%{$reset_color%} %{$fg[cyan]%} %n@%m%f %D{%L:%M:%S} %{$fg[cyan]%} %~ $(git_prompt_info)%{$reset_color%} '
zle reset-prompt
}
setopt PROMPT_SUBST
zle -N zle-line-init
zle -N zle-keymap-select
# write the timestamp of the command for forensics purposes
TMOUT=1
TRAPALRM() {
if [ "$WIDGET" != "complete-word" ]; then
# uncomment the line below to refresh the time in the prompt every second!
# zle reset-prompt
fi
}
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment