* "read -q" and TAB
@ 2001-10-25 16:09 Bart Schaefer
2001-10-25 16:18 ` PATCH (proposed): " Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 2001-10-25 16:09 UTC (permalink / raw)
To: zsh-workers
Does anyone remember why utils.c:getquery() interprets TAB as 'y'? This
has been this way forever (or at least as far back as my own CVS records
go) and my only guess is that it has something to do with spckword().
This surely is broken for purposes of "read -q", and actively dangerous
for checkrmall()?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] 2+ messages in thread
* PATCH (proposed): Re: "read -q" and TAB
2001-10-25 16:09 "read -q" and TAB Bart Schaefer
@ 2001-10-25 16:18 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2001-10-25 16:18 UTC (permalink / raw)
To: zsh-workers
On Oct 25, 4:09pm, Bart Schaefer wrote:
}
} Does anyone remember why utils.c:getquery() interprets TAB as 'y'? This
} has been this way forever (or at least as far back as my own CVS records
} go) and my only guess is that it has something to do with spckword().
In particular, I suggest the following patch:
Index: Src/utils.c
===================================================================
--- Src/utils.c 2001/10/22 14:36:45 1.9
+++ Src/utils.c 2001/10/25 16:15:05
@@ -1477,7 +1477,7 @@
}
while ((c = read1char()) >= 0) {
- if (c == 'Y' || c == '\t')
+ if (c == 'Y')
c = 'y';
else if (c == 'N')
c = 'n';
@@ -1641,11 +1641,11 @@
free(pptbuf);
fflush(shout);
zbeep();
- x = getquery("nyae ", 0);
+ x = getquery("nyae \t", 0);
}
} else
x = 'y';
- if (x == 'y' || x == ' ') {
+ if (x == 'y' || x == ' ' || x == '\t') {
*s = dupstring(best);
if (hist)
hwrep(best);
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-10-25 16:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-25 16:09 "read -q" and TAB Bart Schaefer
2001-10-25 16:18 ` PATCH (proposed): " Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).