feat: add rn command

This commit is contained in:
max_richter 2021-04-26 00:53:32 +02:00
parent 88a4bb542b
commit 17bd44383c
2 changed files with 5 additions and 1 deletions

View File

@ -5,3 +5,4 @@ source $(dirname "$0")/functions/wp.zsh;
source $(dirname "$0")/functions/y.zsh; source $(dirname "$0")/functions/y.zsh;
source $(dirname "$0")/functions/fp.zsh; source $(dirname "$0")/functions/fp.zsh;
source $(dirname "$0")/functions/mke.zsh; source $(dirname "$0")/functions/mke.zsh;
source $(dirname "$0")/functions/rn.zsh;

View File

@ -0,0 +1,3 @@
function rn(){
find . -name "*.$1" -exec sh -c 'mv "$0" "${0%.'$1'}.'$2'"' {} \;
}