Skip to content

Instantly share code, notes, and snippets.

@Ifiht
Last active March 24, 2018 10:46
Show Gist options
  • Save Ifiht/06b514f5ba00d1a3f1e0583f26e678d4 to your computer and use it in GitHub Desktop.
Save Ifiht/06b514f5ba00d1a3f1e0583f26e678d4 to your computer and use it in GitHub Desktop.
ZSH configuration file
function EXT_COLOR () { echo -ne "\033[38;5;$1m"; }
autoload -U colors && colors
watch=all # watch all logins
logcheck=30 # every 30 seconds
WATCHFMT="%n from %M has %a tty%l at %T %W"
HISTFILE=~/.zsh_history
HISTSIZE=200
SAVEHIST=999
TMOUT=600
if [ -n "$STY" ]; then TMOUT=0; fi
readonly TMOUT
export TMOUT
if [ -d "$HOME/bin" ]; then export PATH="$HOME/bin:$PATH"; fi
if [ -d "$HOME/Library/Android/sdk/ndk-bundle$STY" ]; then export PATH="$HOME/Library/Android/sdk/ndk-bundle:$PATH"; fi
export LSCOLORS=gxfxbEaEBxxEhEhBaDaCaD
export CLICOLOR=1
export PROMPT="`EXT_COLOR 009`%n$reset_color@`EXT_COLOR 057`%m$reset_color %~
%# "
export RPROMPT="%*"
# Use modern completion system
autoload -Uz compinit
compinit
zstyle ':completion::complete:*' use-cache on # completion caching, use rehash to clear
zstyle ':completion:*' cache-path ~/.zsh/cache # cache path
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # ignore case
zstyle ':completion:*' menu select=2 # menu if nb items > 2
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} # colorz !
zstyle ':completion:*::::' completer _expand _complete _ignored _approximate # list of completers to use
alias l='ls -a'
alias ll='ls -alh'
alias su='su -'
alias ss='ssh quasar@ariadne'
alias win="sudo sockstat -l | awk \"NR==1 || /tcp|udp/\""
alias win2="sudo lsof -i -n -P | awk \"NR==1 || /LISTEN/\""
alias quit="exit"
alias dv="cd $HOME/../git/Code"
alias ng="cd /usr/local/etc/nginx/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment