From 5173aead615141e4e777e692cef94ae86d6a74d6 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Wed, 9 Nov 2011 21:28:29 +0100 Subject: [PATCH] zshrc: alias remove current working diretory --- doc/grmlzshrc.t2t | 3 +++ etc/zsh/zshrc | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) 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} -- 2.1.4