#1033405 rename: Switch --nono is sensitive to location

#1033405#5
Date:
2023-03-24 14:00:54 UTC
From:
To:
Dear Maintainer,

I tried to rename a bunch of files using `rename`/`file-rename`. I
checked carefully that both names point to the same program.

Since I wasn't sure about the correctness of renaming rule, I
**appended** the switch `--nono`. So, the final command I executed was
`rename 's/.*(S\d\d)_(E\d\d).*/$1$2$_/' --nono *`. Unfortunately, this
directly renamed all files! If I move `--nono` before the pattern,
everything behaves as expected: `rename --nono 's/.*(S\d\d)_(E\d\d).*/$1$2$_/' *`

The man page does not point out this behaviour as well. According to the
man page, giving `--nono` will stop `file-rename` to apply any changes.
In particular it is not mentioned that `--nono` must be given as first
argument and will have no effect otherwise.

I find this behaviour highly dangerous and it deleted some important
files I need to dig out from my backups now.

I think the preferred fix would be make `--nono` work regardless of its
position. A less favourable improvement could be to explicitly mention
the behaviour in the man page.

Thank you very much.

Regards
Max Görner