Thanks to basename
, which is a unix bin file
https://stackoverflow.com/questions/38590165/how-to-rename-file-extentions-in-fish-in-a-for-loop
1for file in *.md2 mv -v -- "$file" (basename $file .md).txt3end
use string replace is also nice.