tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ${LINENO} implementation change for /bin/sh
Date: Tue, 9 May 2017 19:03:59 +0200
From: "rudolf%eq.cz@localhost" <rudolf%eq.cz@localhost>
Message-ID: <c44a5880-9f44-5329-b886-0748ed2614e7%eq.cz@localhost>
| FWIW, i think the "option approach" is worth the effort.
I think I agree, even if we also do the local variant (if that turns
out to be possible, I still have not attempted it.)
| If underscores are available in option names,
There is no spec for that, traditionally they have all been all lower
case alphabetic, but ksh93 has "login_shell" and bash has
"interactive-comments" .. but anything which can be represented as
a shell "word" (which really means almost anything, including white space
(including newlines), is technically possible, \0's may be a bit hard.)
To be usable, it should be something relatively simple though, containing
no shell whitespace or operator characters, but both '_' and '-' (as long
as '-' is not the first) are perfectly safe for this (so would be '/' and '.'
incidentally) - a good guide would be that anything you would normally
have no problems with having in a file name, and not require quoting,
will be fine.
So:
| "lineno_fn_relative" seems to me to be a good name candidate for the option.
would certainly be possible.
The one issue may be that it is more likely that if doing this becomes
more common among other shell implementations, getting a common name that
everyone agrees on would be easier if it remained all lower case alpha,
but (after upper case alpha) '_' is the next best choice, as in the shell,
that essentially counts as a letter.
kre
Home |
Main Index |
Thread Index |
Old Index