From: Bernhard Tittelbach Date: Wed, 9 Nov 2011 20:28:29 +0000 (+0100) Subject: zshrc: alias remove current working diretory X-Git-Tag: v0.4.02~5 X-Git-Url: http://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=5173aead615141e4e777e692cef94ae86d6a74d6 zshrc: alias remove current working diretory --- diff --git a/doc/grmlzshrc.t2t b/doc/grmlzshrc.t2t index 05a0275..8b6e27f 100644 --- a/doc/grmlzshrc.t2t +++ b/doc/grmlzshrc.t2t @@ -1252,6 +1252,9 @@ Short rmdir(1) (remove directory). : **rm** (//nocorrect rm//) rm(1) without spelling correction. +: **rmcdir** (//'cd ..; rmdir $OLDPWD || cd $OLDPWD//) +rmdir current working directory + : **screen** (///usr/bin/screen -c ${HOME}/.screenrc//) If invoking user is root, starts screen session with /etc/grml/screenrc as config file. If invoked by a regular user, start a screen session diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 6add6f2..65f457f 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2566,8 +2566,10 @@ alias r--='chmod 644' alias r-x='chmod 755' # some useful aliases -#a2# Execute \kbd{mkdir -o} +#a2# Execute \kbd{mkdir -p} alias md='mkdir -p' +#a2# Remove current empty directory. Execute \kbd{cd ..; rmdir $OLDCWD} +alias rmcdir='cd ..; rmdir $OLDPWD || cd $OLDPWD' # console stuff #a2# Execute \kbd{mplayer -vo fbdev}