Created
July 1, 2011 21:04
-
-
Save bartku/1059394 to your computer and use it in GitHub Desktop.
.zshrc for FreeBSD
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
setopt AUTO_CD | |
setopt PRINT_EXIT_VALUE | |
setopt HIST_IGNORE_ALL_DUPS | |
HISTFILE=~/.zshhistfile | |
HISTSIZE=1500 | |
SAVEHIST=1500 | |
zstyle ':completion:*' completer _complete _ignored | |
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=* r:|=*' | |
zstyle :compinstall filename '/home/bartek/.zshrc' | |
autoload -Uz compinit | |
compinit | |
#autoload -U promptinit | |
#promptinit | |
#local _myhosts | |
#_myhosts=( ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*} ) | |
#zstyle ':completion:*' hosts $_myhosts | |
#BLACK="%{"$'\033[01;30m'"%}" | |
#GREEN="%{"$'\033[01;32m'"%}" | |
#RED="%{"$'\033[01;31m'"%}" | |
#YELLOW="%{"$'\033[01;33m'"%}" | |
#BLUE="%{"$'\033[01;34m'"%}" | |
#BOLD="%{"$'\033[01;39m'"%}" | |
#NORM="%{"$'\033[00m'"%}" | |
#export PS1="(${RED}%n${NORM}${YELLOW}@${NORM}${GREEN}%m${NORM}:%l [${BOLD}%~${NORM}]) %# " | |
#export PS1="${GREEN}%B%n::%m%b${NORM}${YELLOW}(%l, %~)${NORM} " | |
# colors: RED GREEN YELLOW WHITE BLACK CYAN | |
autoload -U colors && colors | |
#export PS1="%{$fg[green]%}%B%n::%m%b%{$reset_color%}%{$fg[yellow]%}(%l, %~)%{$reset_color%} %{$bg[white]%}%{$fg[black]%}[%h][%T]%{$reset_color%} >" | |
PROMPT="%{$fg[green]%}%B%n::%m%b%{$reset_color%}%{$fg[yellow]%}(%l, %~)%{$reset_color%}> " | |
RPROMPT=" <%{$bg[white]%}%{$fg[black]%}[%h][%T]%{$reset_color%}]" | |
export EDITOR=nano | |
export JAVA_HOME=/usr/local/diablo-jdk1.6.0/ | |
export GRAILS_HOME=/home/bartek/grails-1.3.6/ | |
export PATH=$PATH:/home/bartek/grails-1.3.6/bin/ | |
alias l='ls' | |
alias laf='ls -laF' | |
alias ls='ls -G' | |
alias grep='grep --color' | |
alias nano='nano -c' | |
alias S='su -' | |
alias -s txt=nano | |
alias -s c=nano | |
alias -s h=nano | |
alias -s htm=nano | |
alias -s html=nano | |
alias -s php=nano | |
alias -s java=nano | |
# format titles for screen and rxvt | |
function title() { | |
# escape '%' chars in $1, make nonprintables visible | |
a=${(V)1//\%/\%\%} | |
# Truncate command, and join lines. | |
a=$(print -Pn "%40>...>$a" | tr -d "\n") | |
case $TERM in | |
screen) | |
print -Pn "\ek$a:$3\e\\" # screen title (in ^A") | |
;; | |
xterm*|rxvt) | |
print -Pn "\e]2;$2 | $a:$3\a" # plain xterm title | |
;; | |
esac | |
} | |
# precmd is called just before the prompt is printed | |
function precmd() { | |
title "zsh" "$USER@%m" "%55<...<%~" | |
} | |
# preexec is called just before any command line is executed | |
function preexec() { | |
title "$1" "$USER@%m" "%35<...<%~" | |
} | |
bindkey '^[[1~' beginning-of-line | |
bindkey '^[[3~' delete-char | |
bindkey '^[[4~' end-of-line | |
bindkey '^[[5~' beginning-of-history | |
bindkey '^[[6~' end-of-history |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment