summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-11-09 11:58:00 +0100
committerFlorian Pritz <bluewind@xinu.at>2011-11-09 11:58:00 +0100
commita7abd196451d1f4e3abac7a5fc75afac0c41c415 (patch)
treefbba7ef5e500abf1a66652770a27ecbaf42f1161
parent53c301ac77ef3c2509d8c389abb8ec6e6cab2921 (diff)
downloaddotfiles-a7abd196451d1f4e3abac7a5fc75afac0c41c415.tar.gz
dotfiles-a7abd196451d1f4e3abac7a5fc75afac0c41c415.tar.xz
zshrc: cleanup
This removes stuff I never use. d(): use cd -<tab> regcheck: use regcheck.pl Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--.zshrc91
1 files changed, 3 insertions, 88 deletions
diff --git a/.zshrc b/.zshrc
index cf8663c..a1b8d2a 100644
--- a/.zshrc
+++ b/.zshrc
@@ -285,29 +285,6 @@ password() {
echo $(< /dev/urandom tr -dc A-Za-z0-9 | head -c$count)
}
-# 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
-}
-
# from the grml zshrc iirc
hglob() {
echo -e "
@@ -347,26 +324,8 @@ hglob() {
echo /proc/*/cwd(:h:t:s/self//) # Analog zu >ps ax | awk '{print $1}'<"
}
-# let vim highlight any file for us and save it as html
-2html() {
- vim -n -c ':syntax on' -c ':so $VIMRUNTIME/syntax/2html.vim' -c ':wqa' $1 > /dev/null 2> /dev/null
-}
-
-# download any package's PKGBUILD and go into that dir
-yd(){
- pbget --aur $1
- builtin cd $1
-}
-
-# some script to make this damn agent work easier
source ${HOME}/bin/gpg-agent.sh
-# yeah I know you shouldn't use it...
-google(){
- firefox "http://www.google.com/search?&num=100&q=$*" &
- disown firefox
-}
-
# swaps 2 files
swap() {
if [[ -z $1 ]] || [[ -z $2 ]] || [[ $1 = "-h" ]]; then
@@ -406,13 +365,8 @@ ii() {
echo
}
-# short info to display when opening a new shell
-short_ii() {
- echo -e "\nUser ${RED}"${USER:-"N/A"}"$NC on "${RED}${HOST:-"N/A"}"$NC"
- echo -e "\n${RED}Machine stats:$NC " ; uptime
- echo
-}
+# functions for building chroots
__CHROOTS="/mnt/chroots/arch"
__genchroot() {
@@ -549,25 +503,6 @@ chupdate() {
fi
}
-# source: http://github.com/trapd00r/configs/blob/master/.zsh/functions.zsh
-regcheck() {
- if [[ -z $1 ]] || [[ -z $2 ]] || [[ $1 = "-h" ]]; then
- echo -e "${blue}Usage:$NC regcheck <regexp> <string>";
- return 1
- fi
-
- emulate -L zsh
- zmodload -i zsh/pcre
- pcre_compile $1 && \
- if pcre_match $2; then
- echo -e "${green}matches$NC"
- return 0
- else
- echo "${red}no match$NC"
- return 1
- fi
-}
-
# }}}
# History {{{
export HISTFILE=~/.zsh/histfile
@@ -646,11 +581,10 @@ alias mv='mv -iv'
alias dum='du -kh --max-depth=2'
alias du='du -kh'
alias dus='du -skh'
-#alias df='df -kTh'
if type pydf &>/dev/null; then
- alias df='pydf'
+ alias df='pydf -a'
else
- alias df="df -h"
+ alias df="df -Th"
fi
# function to make ls look nice is below
@@ -659,13 +593,10 @@ alias la='ls -a'
alias lla='ls -la'
alias lld='ls -ld'
-alias newpkgb=' cp $HOME/misc/aur/PKGBUILD.proto PKGBUILD'
-
# well I got used to that name ;)
alias aurball='makepkg --source -f'
alias pkgbuild='makepkg -fc && aurball'
alias aurup="aurploader -l ~/.aurploader -r"
-alias pushpkg='cp *.pkg.tar.gz *.src.tar.gz /mnt/mistral/srv/drop'
#alias sudo="sudo " #Sudo wont recognize aliases without this
alias s='sudo '
@@ -677,21 +608,12 @@ alias wcl='wc -l'
alias mdstat='cat /proc/mdstat'
alias keymap='setxkbmap de -variant nodeadkeys'
alias hexdump='hexdump -C'
-alias rs="sudo -E -s"
alias vp='PAGER=vimpager'
alias v='vim'
-alias gv='gvim'
-alias sc='sudo ${PAGER}'
alias sv='sudo -E vim'
-alias sgv='sudo gvim'
alias g='git'
-# python is too long to type...
-alias q='python'
-alias e='exec'
-#alias b='blaze'
-#alias t='todo.sh -d $HOME/.config/todo.cfg'
alias xc="xclip"
alias xcp="xclip -o | fb"
@@ -699,8 +621,6 @@ alias nsl='nslookup'
alias hgrep="history 0 | mpgrep"
-alias ncmpc='ncmpc -c'
-alias youtube='youtube-dl -b '
alias rscp='rsync --partial --progress'
alias mkdir='nocorrect mkdir'
@@ -728,11 +648,6 @@ alias -g tt='| tail -n 50'
# I always hit y instead of | ...
alias -g vv='|'
-# e.g. "blub.txt" opens the file instead of showing command not found
-alias -s txt=mousepad
-alias -s jpg=gpicview
-alias -s png=gpicview
-
# }}}
# Completion stuff {{{
autoload -Uz compinit