zsh: add interactive mv
This commit is contained in:
parent
f2bcdc906c
commit
01fe1ff04a
@ -270,3 +270,14 @@ _flash_all () {
|
||||
}
|
||||
|
||||
complete -o default -F _flash_all flash_all
|
||||
|
||||
# Interactive mv
|
||||
imv() {
|
||||
local src dst
|
||||
for src; do
|
||||
[[ -e $src ]] || { print -u2 "$src does not exist"; continue }
|
||||
dst=$src
|
||||
vared dst
|
||||
[[ $src != $dst ]] && mkdir -p $dst:h && mv -n $src $dst
|
||||
done
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user