summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-01-29 10:38:34 +0100
committerFlorian Pritz <bluewind@xinu.at>2014-01-29 10:38:34 +0100
commitee6951b6faee6c8a7edf432bc9c2fe58421f2010 (patch)
treeab5f22ec2e54d13d72ce5cc8731a18fb8e07f659
parentcb12dc7400d52d8c75c600c0bd943984f603ea78 (diff)
downloaddotfiles-ee6951b6faee6c8a7edf432bc9c2fe58421f2010.tar.gz
dotfiles-ee6951b6faee6c8a7edf432bc9c2fe58421f2010.tar.xz
zshrc: new aliases + cleanup
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--.zshrc41
1 files changed, 12 insertions, 29 deletions
diff --git a/.zshrc b/.zshrc
index 5354b59..f0a96f5 100644
--- a/.zshrc
+++ b/.zshrc
@@ -334,28 +334,10 @@ swap() {
fi
}
-# get your internal and external IPs
-# also found somewhere on the net
-my_ip() {
- MY_IP=$(/sbin/ifconfig eth0 | awk '/inet/ { print $2 } ' | \
- sed -e s/addr://)
- MY_ISP=$(curl www.wieistmeineip.de | awk '(/[0-9]?[0-9]?[0-9]\.[0-9]?[0-9]?[0-9]\.[0-9]?[0-9]?[0-9]\.[0-9]?[0-9]?[0-9]/) {print}' | awk 'gsub(/[>||<]/," ")' | awk '{print $3}')
+cget() {
+ curl -fJOL --compressed "$@"
}
-ii() {
- echo -e "\nUser ${RED}"${USER:-"N/A"}"$NC on "${RED}${HOST:-"N/A"}"$NC"
- echo -e "\n${RED}Additionnal information:$NC " ; uname -a
- echo -e "\n${RED}Users logged on:$NC " ; w -h
- echo -e "\n${RED}Current date:$NC " ; date
- echo -e "\n${RED}Machine stats:$NC " ; uptime
- echo -e "\n${RED}Memory stats:$NC " ; free
- my_ip 2>&- ;
- echo -e "\n${RED}Local IP Address:$NC" ; echo ${MY_IP:-"N/A"}
- echo -e "\n${RED}ISP Address:$NC" ; echo ${MY_ISP:-"N/A"}
- echo
-}
-
-
hgrep() {
mpgrep <$HISTFILE "$@" | less
}
@@ -439,13 +421,9 @@ alias mv='mv -iv'
# I don't like bytes
alias dum='du -kh --max-depth=2'
-alias du='du -kh'
alias dus='du -skh'
-if type pydf &>/dev/null; then
- alias df='pydf -a'
-else
- alias df="df -Th"
-fi
+alias du='du -kh'
+alias df="df -Th"
# function to make ls look nice is below
alias ll='ls -l'
@@ -458,17 +436,17 @@ alias aurball='makepkg --source -f'
#alias sudo="sudo " #Sudo wont recognize aliases without this
alias s='sudo '
-alias x='x -v'
-alias xx='x -Rv'
-alias u='upload.sh'
alias mtr='mtr -t'
alias wcl='wc -l'
alias mdstat='cat /proc/mdstat'
alias keymap='setxkbmap de -variant nodeadkeys'
alias hexdump='hexdump -C'
+alias grep='grep --color'
alias vp='PAGER=vimpager'
alias v='vim'
+alias l='less'
+alias rf='readlink -f'
alias sc='screen'
alias scw='screen -X eval "chdir $PWD"'
@@ -486,15 +464,20 @@ alias mkdir='nocorrect mkdir'
alias wget='nocorrect noglob wget'
alias p='pacman'
+alias sd='systemctl'
alias su='su -'
# too long to remember
alias asciidoc_full='asciidoc -a icons -a toc -a linkcss -a quirks!'
alias nossh='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
+alias noscp='scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
alias sshpw="ssh -S none -o PubkeyAuthentication=no"
alias nosshpw="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -S none -o PubkeyAuthentication=no"
+alias callgrind='valgrind --tool=callgrind'
+alias vgfull='valgrind --leak-check=full --show-reachable=yes'
+
# other random aliases
alias ☠='pkill -9'
alias nocomment='egrep -v "^\s*(#|$)"'