summaryrefslogtreecommitdiffstats
path: root/.zshrc
diff options
context:
space:
mode:
authorFlorian Pritz <f-p@gmx.at>2008-12-01 20:51:50 +0100
committerFlorian Pritz <f-p@gmx.at>2008-12-01 20:51:50 +0100
commitb21b63986819cd1e422282847a33429828b1250d (patch)
tree81447acdddbf6c17698550f26492b137b8400f93 /.zshrc
parent5a4ff181a9fb2e89443531dc85a6a1454aeaa331 (diff)
downloaddotfiles-b21b63986819cd1e422282847a33429828b1250d.tar.gz
dotfiles-b21b63986819cd1e422282847a33429828b1250d.tar.xz
updated
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc104
1 files changed, 92 insertions, 12 deletions
diff --git a/.zshrc b/.zshrc
index ab15397..3aa3c80 100644
--- a/.zshrc
+++ b/.zshrc
@@ -1,6 +1,6 @@
#----------------------------------------------------#
# File: ~/.zshrc #
-# Version: 0.2.3 #
+# Version: 0.3.1 #
# Author: Florian "Bluewind" Pritz <f-p@gmx.at>#
#----------------------------------------------------#
@@ -56,8 +56,8 @@ zstyle ':completion:*:cd:*' ignore-parents parent pwd
# ignore case
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
-zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
-zstyle ':completion:*:warnings' format '%BSorry, no matches for: %d%b'
+zstyle ':completion:*:descriptions' format $'%{\e[0;31m%}completing %B%d%b%{\e[0m%}'
+zstyle ':completion:*:warnings' format $'%{\e[0;31m%}No matches for:%{\e[0m%} %d'
#--------------------
# Other ZSH options
@@ -70,21 +70,25 @@ setopt extendedglob
setopt auto_pushd
setopt pushd_ignore_dups
setopt no_hup
-setopt print_exit_value
+setopt print_exit_value
setopt SHARE_HISTORY
+setopt NO_clobber
+setopt APPEND_HISTORY
+setopt EXTENDED_HISTORY
#-----------------------
# Variables
#-----------------------
-export CDPATH=.:$HOME
+#export CDPATH=.:$HOME
export OOO_FORCE_DESKTOP=gnome
export PATH=${PATH}:${HOME}/misc/scripts:${HOME}/bin
-export EDITOR=nano
-export PAGER=less
-export LESSCHARSET="UTF-8"
-export LESSOPEN='|/usr/bin/lesspipe.sh %s 2>&-'
-export LESS='-i -c -N -w -g -M -R -P%t?f%f \
-:stdin .?pb%pb\%:?lbLine %lb:?bbByte %bb:-...'
+export EDITOR=vim
+#export PAGER="/usr/share/vim/macros/less.sh"
+export PAGER=vimpager
+#export LESSCHARSET="UTF-8"
+#export LESSOPEN='|/usr/bin/lesspipe.sh %s 2>&-'
+#export LESS='-i -c -N -w -g -M -R -P%t?f%f \
+#:stdin .?pb%pb\%:?lbLine %lb:?bbByte %bb:-...'
#--------------------
# Colors
@@ -158,7 +162,15 @@ alias ls='ls -l --color=auto -h -b'
alias ll='ls -l --color=auto -h -b'
alias la='ls -la --color=auto -h -b'
-alias newpkg=' cp $HOME/misc/aur/PKGBUILD.proto PKGBUILD'
+alias newpkgb=' cp $HOME/misc/aur/PKGBUILD.proto PKGBUILD'
+
+alias u='upload.sh'
+alias mtr='mtr -t'
+alias wcl='wc -l'
+
+alias pager='${PAGER}'
+alias v='vim'
+alias sv='sudo vim'
alias pacman='pacman-color'
alias ncmpc='ncmpc -c'
@@ -177,6 +189,8 @@ alias yqo='yaourt -Qo'
alias y='yaourt'
alias ys='yaourt -S'
alias ad='arson -D'
+alias yr='yaourt -Rs'
+alias yrn='yaourt -Rns'
alias -g gg='| grep --color'
alias -g eg='| egrep --color'
@@ -196,6 +210,71 @@ source ~/.private_stuff.zsh
#--------------------
# Functions
#--------------------
+bk() { cp -b ${1} ${1}_`date +%Y-%m-%d_%T` }
+
+# jump between directories
+# Copyright 2005 Nikolai Weibull <nikolai@bitwi.se>
+# notice: option AUTO_PUSHD has to be set
+ d(){
+ emulate -L zsh
+ autoload -U colors
+ local color=$fg_bold[blue]
+ integer i=0
+ dirs -p | while read dir; do
+ local num="${$(printf "%-4d " $i)/ /.}"
+ printf " %s $color%s$reset_color\n" $num $dir
+ (( i++ ))
+ done
+ integer dir=-1
+ read -r 'dir?Jump to directory: ' || return
+ (( dir == -1 )) && return
+ if (( dir < 0 || dir >= i )); then
+ echo d: no such directory stack entry: $dir
+ return 1
+ fi
+ cd ~$dir
+ }
+
+hglob() {
+ echo -e "
+ / directories
+ . plain files
+ @ symbolic links
+ = sockets
+ p named pipes (FIFOs)
+ * executable plain files (0100)
+ % device files (character or block special)
+ %b block special files
+ %c character special files
+ r owner-readable files (0400)
+ w owner-writable files (0200)
+ x owner-executable files (0100)
+ A group-readable files (0040)
+ I group-writable files (0020)
+ E group-executable files (0010)
+ R world-readable files (0004)
+ W world-writable files (0002)
+ X world-executable files (0001)
+ s setuid files (04000)
+ S setgid files (02000)
+ t files with the sticky bit (01000)
+ print *(m-1) # Dateien, die vor bis zu einem Tag modifiziert wurden.
+ print *(a1) # Dateien, auf die vor einem Tag zugegriffen wurde.
+ print *(@) # Nur Links
+ print *(Lk+50) # Dateien die ueber 50 Kilobytes grosz sind
+ print *(Lk-50) # Dateien die kleiner als 50 Kilobytes sind
+ print **/*.c # Alle *.c - Dateien unterhalb von \$PWD
+ print **/*.c~file.c # Alle *.c - Dateien, aber nicht 'file.c'
+ print (foo|bar).* # Alle Dateien mit 'foo' und / oder 'bar' am Anfang
+ print *~*.* # Nur Dateien ohne '.' in Namen
+ chmod 644 *(.^x) # make all non-executable files publically readable
+ print -l *(.c|.h) # Nur Dateien mit dem Suffix '.c' und / oder '.h'
+ print **/*(g:users:) # Alle Dateien/Verzeichnisse der Gruppe >users<
+ echo /proc/*/cwd(:h:t:s/self//) # Analog zu >ps ax | awk '{print $1}'<"
+ }
+
+2html() { vim -u NONE -n -c ':syntax on' -c ':so $VIMRUNTIME/syntax/2html.vim' -c ':wqa' $1 > /dev/null 2> /dev/null }
+
yd (){
mkdir $1
cd $1
@@ -294,6 +373,7 @@ function repeat()
done
}
+# in the aur as extract
#extract () {
# if [ "$1" = "" ] || [ "$1" = "-h" ]; then
# echo -e "${blue}Usage:$NC x <file>";