Hi, On Wed, Apr 11, 2012 at 2:00 PM, Bret Johnson <bretj...@juno.com> wrote: >> My personal vote would be for bringing a little more order, I mean: >> to suppress recognizing such input as option, if slash is directly >> after some string of characters - in such case path recognition >> should be assumed. > > Problem with that is that I've seen programs that _require_ the options to > beginning immediately after the program name. E.g.: > > DATE /T returns an error, while > DATE/T works like it should
Anybody can write their own option handler, and many have. It's just less uniform on DOS. (And obviously DOS 1.0 had no subdirs, so it didn't matter if it used '/' for options.) getopt is the typical *nix favorite, but GNU popularized getopt_long so much that FreeBSD (and others?) eventually wrote their own. I think there's others too (popt?), but I dunno, I'm not really big on *nix. > Theoretically, either should be OK, but that simply isn't always > the case. Basically, what you're suggesting is simply not possible > in the general case, and gets even uglier when LFN's are involved. LFNs with spaces or multiple dots are the biggest problem. Though there are other weird cases too. Anything that isn't tested much is bound to have a few corner cases (e.g. filenames with '$' in them). I tend to be fairly conservative, mostly out of habit, but also for this reason. > BTW, your suggestion could go the other way too: why can't > *nix change to accept either "-" or "/" (or nothing, like many > DOS programs allow) to start an option, and either "/" or "\" > for a path separator? vi (though perhaps?? not the POSIX standard) allows such, e.g. "vi +/blah myfile.txt" will jump to the first occurrence of "blah" within the text. (Confirmed with VILE here atop PuppyLinux.) But no, it would almost never use '/' because that is the Directory Separator (or whatever you want to call it). Also, '\' is the quote character for the shell, hence "My\ File\ Name.txt". Also, I think *nix (or at least Linux) can use any character for filenames except NUL, i.e. "..." is a valid filename (eek!). ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user