Skip to content

Instantly share code, notes, and snippets.

@walkure
Created November 25, 2021 07:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walkure/c450f01ab0420a161e806cd90a200662 to your computer and use it in GitHub Desktop.
Save walkure/c450f01ab0420a161e806cd90a200662 to your computer and use it in GitHub Desktop.
zsh(Mac) configuration file
# home/end key
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
# git
autoload -Uz vcs_info
setopt prompt_subst
zstyle ':vcs_info:git:*' check-for-changes true
zstyle ':vcs_info:git:*' stagedstr "%F{magenta}!"
zstyle ':vcs_info:git:*' unstagedstr "%F{yellow}+"
zstyle ':vcs_info:*' formats "%F{cyan}%c%u[%b]%f"
zstyle ':vcs_info:*' actionformats '[%b|%a]'
precmd () { vcs_info }
# prompt
PROMPT='
[%B%F{red}%n%f%b:%F{green}%~%f]%F{cyan}$vcs_info_msg_0_%f
%F{yellow}$%f '
# GnuPG
export GPG_TTY=$(tty)
# time command
TIMEFMT=$'\n\n========================\nProgram : %J\nCPU : %P\nuser : %*Us\nsystem : %*Ss\ntotal : %*Es\n========================\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment