summaryrefslogtreecommitdiff
path: root/util/rd
blob: 1917fa0be099fdbfece5a27d78143a9f96e3571a (plain) (blame)
1
2
3
4
5
6
7
8
9
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