Skip to content

Instantly share code, notes, and snippets.

@johnwook
Forked from premek/mv.sh
Last active April 15, 2020 09:06
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