summaryrefslogtreecommitdiffstats
path: root/zsh/zshrc
diff options
context:
space:
mode:
Diffstat (limited to 'zsh/zshrc')
-rw-r--r--zsh/zshrc58
1 files changed, 53 insertions, 5 deletions
diff --git a/zsh/zshrc b/zsh/zshrc
index f6f396a..9995da7 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -1,3 +1,5 @@
+#w
+#w
#PUSER=%{$(echo -n '\e[0;37m')%}%n
#PATKI=%{$(echo -n '\e[0;37m')%}@
#PHOST=%{$(echo -n '\e[1;33m')%}%m
@@ -34,10 +36,7 @@ autoload zmv
alias c="clear && fortune"
-if [ "$HOST" = "galahad" ] || [ "$HOST" = "goliath" ] || [ "$HOST" = "papin" ]; then
- alias ls="ls --color=auto"
-fi
-
+alias ls="ls --color=auto"
alias l="ls -lah"
alias mkdir="mkdir -p"
alias rmrf="rm -rf"
@@ -66,7 +65,7 @@ alias purge="sudo apt-get --purge autoremove"
alias svn-uscan='uscan --verbose --force-download --rename --repack --destdir=../tarballs'
alias svn-bp='svn-buildpackage --svn-builder=pdebuild --svn-ignore-new'
alias gendebpool='dpkg-scanpackages -m . /dev/null | gzip -9c > Packages.gz'
-alias git-bp='git-buildpackage --git-ignore-new --git-pristine-tar --git-upstream-branch=upstream --git-debian-branch=master --git-builder=pdebuild --debbuildopts "-i"'
+alias git-bp='git-buildpackage --git-ignore-new --git-upstream-branch=upstream --git-debian-branch=master --git-builder=pdebuild --debbuildopts "-i"'
alias sfnv='uscan --verbose --no-symlink --rename'
alias -g C='| wc -l'
@@ -117,3 +116,52 @@ cp_p()
}
END { print "" }' total_size=$(stat -c '%s' "${1}") count=0
}
+
+fip() {
+ SUBNET=""
+ if [[ $1 =~ ^[a-z][0-9][0-9][0-9]$ ]]; then
+ if [ "$(echo $1 | cut -c 1)" = "a" ]; then
+ SUBNET='amber'
+ elif [ "$(echo $1 | cut -c 1)" = "b" ]; then
+ SUBNET='blue'
+ elif [ "$(echo $1 | cut -c 1)" = "c" ]; then
+ SUBNET='cyan'
+ elif [ "$(echo $1 | cut -c 1)" = "g" ]; then
+ SUBNET='green'
+ elif [ "$(echo $1 | cut -c 1)" = "i" ]; then
+ SUBNET='indigo'
+ elif [ "$(echo $1 | cut -c 1)" = "j" ]; then
+ SUBNET='jade'
+ elif [ "$(echo $1 | cut -c 1)" = "k" ]; then
+ SUBNET='khaki'
+ elif [ "$(echo $1 | cut -c 1)" = "l" ]; then
+ SUBNET='lemmon'
+ elif [ "$(echo $1 | cut -c 1)" = "m" ]; then
+ SUBNET='magenta'
+ elif [ "$(echo $1 | cut -c 1)" = "o" ]; then
+ SUBNET='orange'
+ elif [ "$(echo $1 | cut -c 1)" = "p" ]; then
+ SUBNET='purple'
+ elif [ "$(echo $1 | cut -c 1)" = "r" ]; then
+ SUBNET='red'
+ elif [ "$(echo $1 | cut -c 1)" = "s" ]; then
+ SUBNET='silver'
+ elif [ "$(echo $1 | cut -c 1)" = "u" ]; then
+ SUBNET='umbra'
+ elif [ "$(echo $1 | cut -c 1)" = "w" ]; then
+ SUBNET='white'
+ elif [ "$(echo $1 | cut -c 1)" = "y" ]; then
+ SUBNET='yellow'
+ else
+ echo "Error: Unknown subnet"
+ fi
+
+ if [ $SUBNET ]; then
+ ping $1.$SUBNET.fastwebserver.de | grep from
+ fi
+ else
+ echo "Syntax error: need char + 3 integer!"
+ fi
+}
+
+cd ~/