develop:zsh: new shell functions
* rnm: don't ever repeat yourself in the shell * chext: easily change file extension
This commit is contained in:
parent
97c87299de
commit
7caae5b8bc
2 changed files with 9 additions and 0 deletions
5
profiles/develop/zsh/functions/chext
Normal file
5
profiles/develop/zsh/functions/chext
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
[[ -z $3 ]] || return 1
|
||||||
|
file=$1
|
||||||
|
ext=$2
|
||||||
|
new="${file:r}.${ext}"
|
||||||
|
mv $file $new
|
4
profiles/develop/zsh/functions/rnm
Normal file
4
profiles/develop/zsh/functions/rnm
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[[ -z $3 ]] || return 1
|
||||||
|
head=${1:h}
|
||||||
|
name="${head}/${2}"
|
||||||
|
mv $1 $name
|
Loading…
Reference in a new issue