diff options
author | George Abbott <george@gabbott.dev> | 2023-10-31 17:54:07 +0000 |
---|---|---|
committer | George Abbott <george@gabbott.dev> | 2023-10-31 17:54:07 +0000 |
commit | 4d0bd914e7c1ee65f4036e60149a7b891906a5d3 (patch) | |
tree | c2a6751823e064e003cd4f6166df07bfc106d7eb /util/rd |
Commit all to date.
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 |