Created
November 10, 2023 23:45
-
-
Save bodziek666/58a7c0e76a26ffc66f50ec9e6cce093c to your computer and use it in GitHub Desktop.
First attemt in using zsh
This file contains 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
# Set maximum history size | |
HISTSIZE=100000 | |
# Set maximum history size stored in history file | |
SAVEHIST=100000 | |
# Append to history instead of replacing when using multiple ssh sessions | |
setopt appendhistory | |
# Append command to history without waiting for shell to exit | |
setopt INC_APPEND_HISTORY | |
# Share history between sessions/terminals | |
setopt SHARE_HISTORY | |
# Ignore lines prefixed with '#' | |
setopt interactivecomments | |
# Ignore duplicate in history | |
setopt hist_ignore_dups | |
# Prevent record in history entry if preceding them with at least one space | |
setopt hist_ignore_space | |
# completion | |
autoload -Uz compinit | |
compinit | |
zstyle ':completion:*' menu select | |
# fzf | |
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh | |
# vcs integration | |
autoload -Uz vcs_info | |
# git integration | |
zstyle ':vcs_info:*' enable git | |
zstyle ':vcs_info:git:*' check-for-changes true | |
zstyle ':vcs_info:git:*' stagedstr ' %F{green}●%f' | |
zstyle ':vcs_info:git:*' unstagedstr ' %F{red}✘%f' | |
zstyle ':vcs_info:git:*' formats '%s(%F{yellow}%b%f%c%u) ' | |
zstyle ':vcs_info:git:*' actionformats '%s(%F{yellow}%b%f|%a%u%c) ' | |
precmd() { vcs_info } | |
# prompt | |
setopt PROMPT_SUBST | |
PROMPT='%B%F{green}%n@%m %B%F{cyan}%~%b%f %B${vcs_info_msg_0_}%b%B%F{blue}%#%b%f ' | |
# aliases | |
alias ls='ls --color=auto' | |
alias grep='grep --color=auto' | |
alias zgrep='zgrep --color=auto' | |
alias egrep='egrep --color=auto' | |
alias pgrep='pgrep --color=auto' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment