Skip to content

Instantly share code, notes, and snippets.

@kostorv
Last active October 18, 2019 08:20
Show Gist options
  • Save kostorv/96edac012b1b1ea28446d3249d252b5e to your computer and use it in GitHub Desktop.
Save kostorv/96edac012b1b1ea28446d3249d252b5e to your computer and use it in GitHub Desktop.
ZSHRC preferences
HISTFILE=~/.zsh_history
HISTSIZE=5000
SAVEHIST=10000
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# Aliases
alias ll='ls -alF'
# Autocompletion
autoload -Uz compinit promptinit
compinit
# 6-pad keys fix
# Insert-Home-Delete-End-Page [up,down]
bindkey "^[[A" history-search-backward
bindkey "^[[B" history-search-forward
bindkey "^[[1~" beggining-of-line
bindkey "^[[4~" end-of-line
bindkey "^[[3~" delete-char
bindkey "^[3;5~" delete-char
# Load prompt themes
promptinit
# Prompt building
PROMPT="%B%F
%f[%(?.%F{green}%?.%F{red}%?)%f] %F{1}%n%f%b@%m:%B%F{yellow} %/
%f%D{%T} %(#.#.$) %b"
# http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html
# Chapter 13.2 Simple Prompt Escapes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment