Created
December 3, 2022 02:32
-
-
Save worldwise001/72f771bbe8d40c28a2bc81107c3cdd98 to your computer and use it in GitHub Desktop.
my zshrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Opt out of homebrew analytics collection | |
export HOMEBREW_NO_ANALYTICS=1 | |
### COLORS ### | |
autoload -U colors && colors | |
### GIT CONFIGURATION ### | |
autoload -Uz vcs_info | |
precmd_vcs_info() { vcs_info } | |
precmd_functions+=( precmd_vcs_info ) | |
setopt prompt_subst | |
RPROMPT=\$vcs_info_msg_0_ | |
zstyle ':vcs_info:git:*' formats '%F{240}(%b)%r%f' | |
zstyle ':vcs_info:*' enable git | |
### GIT ALIASES ### | |
alias gs='git status ' | |
alias gap='git add --patch' | |
alias gb='git branch ' | |
alias gc='git commit' | |
alias gd='git diff' | |
alias gk='gitk --all&' | |
alias gx='gitx --all' | |
alias git-co='git checkout' | |
alias got='git ' | |
alias get='git ' | |
### TERMINAL PROMPT ### | |
PROMPT="%{$fg[cyan]%}%D{%a %d-%m}%{$reset_color%} (%{$fg[magenta]%}%n@%m%{$reset_color%}) : %{$fg[green]%}%~%{$reset_color%} " | |
### ALIASES ### | |
alias vi=vim | |
export GREP_OPTIONS='--color=auto' | |
export GREP_COLOR='1;32' | |
export CLICOLOR='1' | |
alias ls='ls -G' # OS-X SPECIFIC - the -G command in OS-X is for colors, in Linux it's no groups | |
export LSCOLORS="gxDxFxdxCxExExhbadgxgx" | |
### ZSH HISTORY ### | |
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search | |
zle -N up-line-or-beginning-search | |
zle -N down-line-or-beginning-search | |
[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search | |
[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search | |
key[Control-Left]="${terminfo[kLFT5]}" | |
key[Control-Right]="${terminfo[kRIT5]}" | |
[[ -n "${key[Control-Left]}" ]] && bindkey -- "${key[Control-Left]}" backward-word | |
[[ -n "${key[Control-Right]}" ]] && bindkey -- "${key[Control-Right]}" forward-word | |
PROMPT_COMMAND='history -a' | |
# Number of lines to keep in the history file | |
export HISTSIZE=1000000 | |
# zsh history is timestamped as YYYY-MM-DD HH:MM:SS | |
export HISTTIMEFORMAT='%F %T ' | |
# Don't put duplicate lines in the history. | |
export HISTCONTROL=ignoredups | |
############################## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment