summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Ritter <xeno@thehappy.de>2010-02-12 17:32:16 +0100
committerStefan Ritter <xeno@thehappy.de>2010-02-12 17:32:16 +0100
commit56d43893c471448ef70367bcf6464495fdff6b2c (patch)
treefb8170c00e5b8cee04059850bedc541922ffad78
parente62a47f5067dff4400908df5754a6103536833a8 (diff)
Purged some old aliases and added a cp_p function
-rw-r--r--zsh/zshrc29
1 files changed, 19 insertions, 10 deletions
diff --git a/zsh/zshrc b/zsh/zshrc
index 05c8727..0bc647a 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -43,22 +43,16 @@ alias v="vim"
mail() { mutt -F ~/.secgit/muttrc.$1 }
-alias a='acpi'
-alias e='emacs'
alias g='git'
alias gitserv="git daemon --verbose --reuseaddr --base-path=. --export-all ./.git"
alias iso="genisoimage -l -J -R -o cd.iso"
alias m="mocp"
-alias mp="mplayer"
-alias n='newsbeuter'
alias q='quilt'
alias r="rdesktop-vrdp -k de -K localhost"
alias s="screen -r -d"
-alias saft="sendfile"
alias t="tmux a"
alias tmux='tmux -u'
alias vbm="VBoxManage"
-alias w="wicd-client -n"
alias agu="sudo aptitude update"
alias agdu="sudo aptitude dist-upgrade"
@@ -79,10 +73,6 @@ alias -g H='| head'
alias -g T='| tail'
alias -g L='| less'
-alias -s mp3=mplayer
-alias -s exe=wine
-alias -s pdf=apvlv
-
shot() {
if [ "$1" != '' ]; then
scrot -c -d 3 $1
@@ -104,3 +94,22 @@ case $TERM in
precmd () {print -Pn "\e]0;%n@%m: %~\a"}
;;
esac
+
+cp_p()
+{
+ strace -q -ewrite cp -- "${1}" "${2}" 2>&1 \
+ | awk '{
+ count += $NF
+ if (count % 10 == 0) {
+ percent = count / total_size * 100
+ printf "%3d%% [", percent
+ for (i=0;i<=percent;i++)
+ printf "="
+ printf ">"
+ for (i=percent;i<100;i++)
+ printf " "
+ printf "]\r"
+ }
+ }
+ END { print "" }' total_size=$(stat -c '%s' "${1}") count=0
+}