summaryrefslogtreecommitdiffstats
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh')
-rw-r--r--zsh/zshrc82
1 files changed, 9 insertions, 73 deletions
diff --git a/zsh/zshrc b/zsh/zshrc
index 2ecb72a..23e8e2f 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -7,7 +7,7 @@
#PROMPT="$PUSER$PATKI$PHOST$PDOPP$PPATH$PCOMM "
-PROMPT="%~%(1v.%F{green}%1v%f.) %% "
+PROMPT="%~%(1v.%F{green}%1v%f.)%F{red}%2v%f %% "
zstyle ':completion:*' special-dirs true
zstyle ':completion:*:*:kill:*' menu yes select
@@ -49,6 +49,10 @@ precmd() {
psvar=()
vcs_info
[[ -n $vcs_info_msg_0_ ]] && psvar[1]="$vcs_info_msg_0_"
+
+ if [ "$(quilt applied 2> /dev/null)" ]; then
+ psvar[2]=" QUILT"
+ fi
}
alias c="clear && fortune"
@@ -72,11 +76,11 @@ alias t="tmux a"
alias tmux='tmux -u'
alias vbm="VBoxManage"
-alias agu="sudo aptitude update"
-alias agdu="sudo aptitude dist-upgrade"
+alias agu="sudo apt-get update"
+alias agdu="sudo apt-get dist-upgrade"
alias acs="apt-cache search"
-alias agi="sudo aptitude install"
-alias as="aptitude show"
+alias agi="sudo apt-get install"
+alias as="apt-cache show"
alias purge="sudo apt-get --purge autoremove"
alias svn-uscan='uscan --verbose --force-download --rename --repack --destdir=../tarballs'
@@ -116,71 +120,3 @@ 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
-}
-
-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 ~/