develop:zsh: new shell functions

* rnm: don't ever repeat yourself in the shell
* chext: easily change file extension
This commit is contained in:
Timothy DeHerrera 2020-01-05 00:01:20 -07:00
parent 97c87299de
commit 7caae5b8bc
No known key found for this signature in database
GPG key ID: 8985725DB5B0C122
2 changed files with 9 additions and 0 deletions

View file

@ -0,0 +1,5 @@
[[ -z $3 ]] || return 1
file=$1
ext=$2
new="${file:r}.${ext}"
mv $file $new

View file

@ -0,0 +1,4 @@
[[ -z $3 ]] || return 1
head=${1:h}
name="${head}/${2}"
mv $1 $name