Skip to content

Instantly share code, notes, and snippets.

@johnwook

johnwook/rename.fish

Forked from premek/mv.sh
Last active Apr 15, 2020
Embed
What would you like to do?
Rename files in fish using mv command without typing the full name two times
function rename
if test (count $argv) -ne 1
or test ! -f $argv[1]
command mv $argv
return
end
set newfilename $argv[1]
vared newfilename
command mv -v -- $argv[1] $newfilename
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.