[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: heirarchical lists, one more time.



> This convention is slightly broken in that literal ^As are
> misinterpreted.  As I pointed out to Noah, this can be fixed with an
> encoding convention such as:
>     ^A --> ^A^A
>     `word' break --> ^A^B
> This is unambiguous to the reader.

we got the convention from Byron's rc, which got it from Duff's rc.
(to quote the bugs section of the v10 man page:

	Environment variables are kludgy for UNIX compatibility.
	Woe betide the imported variable whose value contains a
	ctrl-a.

fyi, the plan9 version used nul characters (0 encoding) to separate
elements, but you can't do that on unix.)

the change you propose would be very inconvenient for people who
are interoperating es with rc.  for example, i use es as my interactive
shell, but lots of my scripts are still written in rc.  if things like
$path got confused, that would be bad.

we had considered at one point using the less incompatible but still
not 100% compatible

	word break -> ^a
	^a -> ^b^a
	^b -> ^b^b

which has the effect of misinterpreting some raw sequences.  we decided
not to do this because the added value of allowing control-a in an
environment variable was so minor.

were we wrong?  should this be ``fixed'' in the next es release?

paul