DOS/Windows and slashes (was Re: Windows XP Pro and Possible
filePro Bug)
Bill Vermillion
fp at wjv.com
Sat Dec 4 21:54:19 PST 2004
press any key to reboot -oops- Fairlight said on Sat, Dec 04 21:54
> At Sat, Dec 04, 2004 at 07:35:54PM -0500 or thereabouts,
> suspect Bill Vermillion was observed uttering:
> > And one reason that MS used the "\" for pathnames was that
> > in their languages you had a choice of two switches, "/" or "-",
> > when specifiying command line options.
> > I remember when I was learning to use random access fixed length
> > records and having to specify two or three options on the file
> > names given. You could use /nnn or -nnn in their BASIC
> > interpreter, and I vaguely recall the same thing in their Fortran.
> Unfortunately, people have gotten too used to /switch
> arguments, and expect things to be "/?" for help instead of
> "-h" or "--help".
I always thought the -- instead of the - that did us so well
for years was excessive - but then the options started getting
excessive in themselves.
Some of the old commands started getting so many options that
they ran out of lowercase letters. I have to read the man
page for 'ls' options when it's not one of the dozen or so I
remember off-hand. I just checked and there are 32 dash options
to 'ls' on this machine.
When you get so many options one little typo can do you in.
But then again I get done in by typos anyway. I wondered
what had happened to a file I was editing when I got into a wrong
program by accident. It wasn't in the directory until I noticed
the name with a comma and letter after it.
My finger slipped off the 'v' key onto the adjacent 'c' key and
I type ci <filename> when I wanted to type vi <filename>.
But that's how we learn isn't it? Have you ever done that one?
> I had a Windows user request that I add "/?"
> as an argument for help for one of my packages. Getopt doesn't
> like that though, so I have to cycle through the argv array and
> make sure none of them are that particular string. It's useless
> on *nix as an option, unless you escape it or set noglob. But
> Windows users insist it should be there.
And there are places where ? is a single character wildcard too.
I think it best not to use characters that when used in different
areas may have to be escaped or not depending on circumstances
or the shell being used.
> How annoying a convention. Another instance of Not Invented
> Here. :( I don't mind porting to MS in a functional sense.
> Being asked to emulate a poor design decision that became a
> defacto convention is something that will rankle me a little,
> but I did it anyway. If that's what they want, that's what they
> get. It's just one of those "gotchas" to keep in mind when
> porting.
As my first post pointed out the / came about from the days
that Microsoft was only a language house. And they started off
with purloined code to boot.
> I've seen it go the other way--someone had a Windows package
> that was being ported to linux, and all the argument options
> started with / and you'd put in a pathname to a file and it
> would want to say it was an illegal option rather than taking
> it as part of the path. They fixed theirs as well, but it's
> annoying that not everyone has adopted the relatively sane -
> and -- getopt switch standards.
Or things which come in from a Mac world where a / is permitted
in a file name. I have enough problems with <spaces> when things
get moved cross-platform.
--
Bill Vermillion - bv @ wjv . com
More information about the Filepro-list
mailing list