Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: history-expand didn't expand $#



| % true
| % echo !! <M-!>

expand the line into 

| % echo true

right, but

| % mv file.c !#$.old <M-!>

didn't get expansed into

| % mv file.c file.c.old

because words weren't counted during expansion.

Can someone confirm that the following patch don't break anything ?


--- Src/hist.c.old	Tue Sep 21 17:08:58 1999
+++ Src/hist.c	Fri Oct 22 16:44:46 1999
@@ -1077,7 +1077,7 @@
 void
 ihwbegin(int offset)
 {
-    if (stophist == 2 || strin)
+    if (stophist == 2)
 	return;
     if (chwordpos%2)
 	chwordpos--;	/* make sure we're on a word start, not end */
@@ -1097,7 +1097,7 @@
 void
 ihwend(void)
 {
-    if (stophist == 2 || strin)
+    if (stophist == 2)
 	return;
     if (chwordpos%2 && chline) {
 	/* end of word reached and we've already begun a word */


-- 
Alexandre Duret-Lutz




Messages sorted by: Reverse Date, Date, Thread, Author