massren icon indicating copy to clipboard operation
massren copied to clipboard

Argument leader

Open mattn opened this issue 10 years ago • 6 comments

I'm guessing most of users of massren doesn't expect /n like argument. I hope to change it to -n on windows. Thank you

mattn avatar Feb 19 '14 05:02 mattn

If I'm not mistaken, this is a feature of go-flag - it automatically displays the arguments as -n, --dry-run on POSIX systems and /n, /dry-run on Windows. I think the parser supports both though, so it's still possible to use -n on Windows too.

laurent22 avatar Feb 19 '14 17:02 laurent22

Yes, I'm afraid of case that windows user may do like follow:

C:\>mkdir C:\n
C:\>massren /n

mattn avatar Feb 20 '14 00:02 mattn

Hmm, but wouldn't the second example only apply to someone using Cygwin or equivalent? And even then, I believe they'd need to do something like massren $(cygpath -w "/n"), which would translate the path to the backslash one.

Actually as I don't use Windows much I don't have a strong opinion on this one. If it turns out it's an issue, I don't mind defaulting it to the -n syntax.

laurent22 avatar Feb 21 '14 16:02 laurent22

The windows users who uses linux often too are using path / separator. This issue is not an issue for cygwin users. And quote "/n" don't fix this case. If want to fix this issue, you will have to fix the argument leader as -.

mattn avatar Feb 24 '14 00:02 mattn

If this is about using commands like, C:/massren.exe /n, they work (and will work) perfectly fine as long as you put spaces between arguments (the same behaviour as POSIX systems)

hashhar avatar Nov 21 '15 00:11 hashhar

In GitBash (terminal comming with Git on Windows) massren --help display flags as /help but they do not work. For example:

massren /V

open the editor with single line \ inside.

kpym avatar Feb 06 '21 08:02 kpym