diff options
Diffstat (limited to 'util/rd')
-rwxr-xr-x | util/rd | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -0,0 +1,10 @@ +#!/bin/sh +# rd: rename current directory +# rd "new-name" + + +[ "$1" = "" ] && echo "rd: rename directory: new name missing" && return +curr="$(basename "$(pwd)")" +cd .. +mv "$curr" "$1" +cd "$1" || return |