[bglug] zshrc

k|b|s kbs@bglug.it
Ven 24 Dic 2004 10:45:41 CET


Per chi chiedeva ieri sera il mio zshrc:

--8<-- CUT HERE --8<-- 
# dot zshrc 4 k|b|s

# exports
export EMAIL_ADDR="anonymous@anonymous.yes"
export LC_ALL=it_IT@euro
export TTYN=`tty | tr -d '[:alpha:]' | tr -d '[=/=]'`
export NNTPSERVER="localhost"
export MANPAGER=most
export HISTFILE=$HOME/.zsh_history
export HISTSIZE=1000
export SAVEHIST=1000
#export DISPLAY=localhost:0.0

# Aliases
alias ls="ls --color"
alias ll="ls --color -lah"
alias l="ls --color -l"
alias su="su -"
alias X="startx -- -nolisten tcp"
alias rf="rm -rf"
#alias gnus="xemacs -f gnus"
#alias cp="cp -g"
alias vi="vim"
alias workbone="workbone -a"
alias mr="most README"
alias irssi="irssi -c tin"
alias sorgi="source $HOME/.zshrc"
alias du="du -h"
alias nmap="nmap -v"
alias diff="colordiff"
alias ccal="ccal -c=$HOME/.calcol"
alias tin="tin -r"
alias cdon="echo Sto montando il CDROM... ; mount /cdrom ; echo ...fatto!"
alias cdoff="echo Smonto il CDROM... ; umount /cdrom ; eject ; echo ...fatto!"
alias esplora="mount /cdrom ; cd /cdrom ; mc"
alias cache="apt-cache search $1"
alias mostra="apt-cache show $1"

# prompt
grey="%{$(echo -n '\e[1;30m')%}"
red="%{$(echo -n '\e[1;31m')%}"
green="%{$(echo -n '\e[1;32m')%}"
yellow="%{$(echo -n '\e[1;33m')%}"
blue="%{$(echo -n '\e[1;34m')%}"
magenta="%{$(echo -n '\e[1;35m')%}"
cyan="%{$(echo -n '\e[1;36m')%}"
white="%{$(echo -n '\e[1;37m')%}"
lored="%{$(echo -n '\e[0;31m')%}"
logreen="%{$(echo -n '\e[0;32m')%}"
loyellow="%{$(echo -n '\e[0;33m')%}"
loblue="%{$(echo -n '\e[0;34m')%}"
lomagenta="%{$(echo -n '\e[0;34m')%}"
locyan="%{$(echo -n '\e[0;35m')%}"
lowhite="%{$(echo -n '\e[0;37m')%}"

# ps1
if [ `id -u` -eq 0 ]; then
export prompt="$green($TTYN) $red%n $blue%. $red> $lowhite"
else
export prompt="$green($TTYN) $yellow%n $blue%. $yellow> $lowhite"
fi

# setta il path
export PATH=~/bin:/usr/bin:/usr/local/bin:/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/bin/X11:/usr/games:/opt/kde/bin


# editor & pager
export EDITOR=/usr/bin/vim
export PAGER=/usr/bin/most

# uncomment to use 'vi' commands for editing the command line (adv users only)
# bindkey -v

# Resetta il terminale
function myreset () {
  if [[ $TERM = linux ]] echo -n '\e(K\e[1;2]'
}
myreset

# Vediamo le directory a colori + completion con menu
eval `dircolors  -b`
#export LS_COLORS=di=1
#autoload -U colors
#colors
#zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' menu select=2
zstyle ':completion:*' list-colors 'di=01;34'
zmodload -i zsh/complist

# compinit
autoload -U compinit
compinit

# zftp
autoload -U zfinit
zfinit

# zmv
autoload zmv
--8<-- CUT HERE --8<-- 

Se sotto slack basta copiarlo come .zshrc hell home, se sotto debian va messo
in /etc/zsh/zshrc
Controlla ed eventualmente modifica i vari path e alias.
ciao


-- 
             ::1 sweet ::1
k|b|s ~> mailto `echo ti.gulgb@sbk|'rev'`



Maggiori informazioni sulla lista bglug