AutoYADM commit: 2025-03-26 18:45:07
This commit is contained in:
parent
de93c67826
commit
1f2f8b9dab
2 changed files with 4 additions and 6 deletions
|
@ -1,8 +1,11 @@
|
|||
#!/bin/env zsh
|
||||
# utility to easily rename a file without
|
||||
# having to type out its path twice
|
||||
function ren {
|
||||
from="$1"
|
||||
to="$2"
|
||||
DIR="${$(realpath "$from")%%$(basename "$from")}"
|
||||
# echo "$DIR"
|
||||
echo "$(realpath "$from")" "$DIR$to"
|
||||
mv "$(realpath "$from")" "$DIR$to"
|
||||
echo "Moved $(realpath "$from") to $DIR$to"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue