#! /bin/zsh #Let's make grep more talkative alias grep="grep -n --color" #Tip to prevent shell access from the console where X was started from it alias s="startx& disown; logout" #The so famous ls --color alias ls='ls --color' #Most of the time when i hit an IP address or FQDN on my shell that's to ping it, #thanx to the lines below i can do it directly, and even change easily the command being used #export CMD_NET="ping -c 42 -R -s 8" export CMD_NET="ping -c 42 " alias -s html=$CMD_NET alias -s org=$CMD_NET alias -s php=$CMD_NET alias -s com=$CMD_NET alias -s net=$CMD_NET alias -s fr=$CMD_NET alias -s de=$CMD_NET alias -s {0..255}=$CMD_NET #Lauch program according to the file extention - note: I never use it ^^ alias -s c=vim alias -s cpp=vim alias -s png=eog alias -s gif=eog alias -s jpg=eog alias -s pdf=xpdf # just a line to configure my oracle client #export TNS_ADMIN='/etc/oracle' #tmp alias to count how many line i wrote alias sd=sudo #tip to get my public IP address alias pub="wget --quiet -O - whatismyip.org" #set Emacs mode bindkey -e # Correct the delete key bindkey '\e[3~' delete-char # Bind shift+tab to go backward completion bindkey '^[[Z' reverse-menu-complete # Some nice completion autoload -U compinit compinit zstyle ':completion::complete:*' use-cache 1 zmodload -i zsh/complist autoload -U zmv # completion rules zstyle ':completion:*' completer _complete _list _oldlist _expand _ignored _match _correct _approximate _prefix zstyle ':completion:*:match:*' original only zstyle ':completion:*:approximate:*' max-errors 1 numeric zstyle ':completion:*' auto-description 'Specify: %d' zstyle ':completion:*' format 'Completing %d' zstyle ':completion:*' verbose true zstyle ':completion:*:functions' ignored-patterns '_*' zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns '*?.(o|c~|zwc)' '*?~' zstyle -e ':completion:*:approximate:*' max-errors 'reply=( $(( ($#PREFIX+$#SUFFIX)/3 )) numeric )' # formatting and messages zstyle ':completion:*' verbose yes zstyle ':completion:*:descriptions' format $'%{\e[0;31m%}%d%{\e[0m%}' zstyle ':completion:*:messages' format $'%{\e[0;31m%}%d%{\e[0m%}' zstyle ':completion:*:warnings' format $'%{\e[0;31m%}No matches for: %d%{\e[0m%}' zstyle ':completion:*:corrections' format $'%{\e[0;31m%}%d (errors: %e)%{\e[0m%}' zstyle ':completion:*' group-name '' zstyle ':completion:*' file-sort name zstyle ':completion:*' menu select=long zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters zstyle ':completion::complete:*' use-cache 1 zstyle ':completion::complete:*' cache-path ~/.zcompcache/$HOST zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} zstyle ':completion:*:complete:-command-::commands' ignored-patterns '*\~' zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns \ '*?.(o|c~|old|pro|zwc)' '*~' #! /bin/bash # how many line/command we record export HISTSIZE=5000 # where we record them export HISTFILE="$HOME/.zshhistory" # comit the conf export SAVEHIST=$HISTSIZE # tell it to ignore the duplicate entries setopt hist_ignore_all_dups # set up the extended globing - that's so nice :) setopt extendedglob autoload -U promptinit promptinit prompt adam2