This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
> >It would be fine with me to leave the '--type TYPE' syntax as an > >alternative to --unix, --windows, --mixed, but having the --type mixed > >as the only way to get a forward-slash Windows path seemed counter- > >intuitive to me. Also --type dos to me should mean short-name as well. > >So should I put together another patch to do this as well? > > Actually, I think that specifying the output via --type makes things a > little more structured. We can't go back now, though, because users > would complain. It looks like I should have added a '--type unix' if > I was going to be consistent, though. > > I dunno. I don't feel really strongly about this, though. If no one > agrees then I don't mind changing it. That does sound like a better idea. This patch is therefore better. It fleshes out the --type option so that one can specify: 'dos', 'mixed', 'unix', or 'windows'. The 'dos' type includes short-name. While I was at it, I added a --dos option which is the same as --windows --short-name. It's too bad about the feature bloat, but having both should satisfy both structure and users. I feel good about changing the default action to --unix since before -u or -w was required in every case, so the only thing it would change (to users) is if before they were always typing something like 'cygpath c:' and getting errors now they will get UNIXy path output. I also corrected an apparent bug in the long_options that prevented "close", "file" and "type" from working, even though -c, -f, and -t did. I'm not intimate with getopt but it looks like the flag part of long_options struct should be set to NULL if you're using the optarg. ChangeLog: 2002-06-22 Joshua Daniel Franklin <joshuadfranklin@yahoo.com> * cygpath.cc (long_options): Add "dos" and "mixed", correct "close", "file" and "type" to use NULL flag. (usage): Clean up usage output (more), accomodate new options. (main): Add --dos and --mixed options; accomodate all output forms in --type. Make UNIXy output default.
Attachment:
cygpath.cc-patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |