[SUBDIRMK RFC v2 2/5] README: v2: Use &\ for escaping; abolish \&

Ian Jackson ijackson at chiark.greenend.org.uk
Thu Dec 19 00:49:56 GMT 2019


"\&" causes lots of trouble, including difficulty specifying certain
resulting strings.

Previously I proposed a scheme using &$@ but this is only useful to
provide a way to write &s.

The $-doubling regime which will come later wants a way to produce a
single literal $, so introduce that now using the same syntax.
And &\ feels quite natural to me.

Not implemented yet.

Signed-off-by: Ian Jackson <ijackson at chiark.greenend.org.uk>
---
 README | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/README b/README
index a8ab503..fe9f5c3 100644
--- a/README
+++ b/README
@@ -247,7 +247,9 @@ So pathname syntax is a subset of:
     '&' [ '^' | '~' ] [ lc | '/' | '.' | '=' ]
 
 &&		=>	&&		for convenience in shell runes
-\&		=>	&		general escaping mechanism
+
+&\&		=>	&		general escaping mechanism
+&\$		=>	$
 
 &$VARIABLE	$(sub/dir/VARIABLE)
 	VARIABLE is ASCII starting with a letter and matching \w+
@@ -288,7 +290,7 @@ So pathname syntax is a subset of:
 
 	Notably
 		STUFFSTUFF		=> STUFFSTUFF
-		\STUFF			=> STUFF
+		STUFF\STUFF		=> STUFF
 		STUFF:changequote &	=> set escape back to &
 
 &TARGETS_things
-- 
2.11.0




More information about the sgo-software-discuss mailing list