meh.sh

alias meh='for f in *; do printf "mv \"%s\" \"%s\"\n" "$f" "$f"; done > meh.sh; printf "rm meh.sh\n" >> meh.sh'

for f in *; do … doneLoops over every file in the current directory (excluding dot‑files).
printf "mv \"%s\" \"%s\"\n" "$f" "$f"Prints a quoted mv command that moves the file to itself
> meh.shRedirects the first set of printed lines into a new file called meh.sh.
printf "rm meh.sh\n" >> meh.shAppends a final line that removes meh.sh.
Tip – If you want the script to execute immediately after being written, just append ; bash meh.sh to the alias

Sometimes I have to do a mass rename and this combines the plan creation task in one command, I edit the result file and after execution all is cleaned up.

In other words this creates a todo list as bash file which I can edit to perform the actions I want to do.

Update:

Since I moved to fish shell, here is a fish function, to be put in ~/.config/fish/functions/

function meh
    for f in *
        printf "mv \"%s\" \"%s\"\n" "$f" "$f"
    end > meh.sh
    printf "rm meh.sh\n" >> meh.sh
end