From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8978 invoked from network); 4 Jul 1999 15:59:25 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Jul 1999 15:59:25 -0000 Received: (qmail 16622 invoked by alias); 4 Jul 1999 15:59:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6969 Received: (qmail 16615 invoked from network); 4 Jul 1999 15:59:10 -0000 Message-Id: <9907041530.AA29090@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: PATCH: pws-25: printing bindkey-like sequences. Date: Sun, 04 Jul 1999 17:30:30 +0200 From: Peter Stephenson Did you know that there's currently no way of getting print to recognize all the possible bindkey sequences? It's such a tiny a change I can't see why it shouldn't be added. --- Doc/Zsh/builtins.yo.prbk Fri Jun 25 11:22:28 1999 +++ Doc/Zsh/builtins.yo Sun Jul 4 17:25:25 1999 @@ -550,7 +550,7 @@ `tt(-)' in this context are swapped. ) findex(print) -item(tt(print) [ tt(-nrslzpNDPoOicm) ] [ tt(-u)var(n) ] [ tt(-R) [ tt(-en) ]] [ var(arg) ... ])( +item(tt(print) [ tt(-bnrslzpNDPoOicm) ] [ tt(-u)var(n) ] [ tt(-R) [ tt(-en) ]] [ var(arg) ... ])( With no flags or with flag `tt(-)', the arguments are printed on the standard output as described by tt(echo), with the following differences: the escape sequence `tt(\M-)var(x)' metafies the character @@ -569,6 +569,13 @@ unless the tt(-e) flag is given. The tt(-n) flag suppresses the trailing newline. Only the tt(-e) and tt(-n) flags are recognized after tt(-R); all other arguments and options are printed. +) +item(tt(-b))( +Recognize all the escape sequences defined for the tt(bindkey) command, +see +ifzman(zmanref(zshmodules))\ +ifnzman(noderef(The zle Module))\ +. ) item(tt(-m))( Take the first argument as a pattern (should be quoted), and remove --- Src/builtin.c.prbk Fri Jun 25 15:01:06 1999 +++ Src/builtin.c Sun Jul 4 17:24:14 1999 @@ -87,7 +87,7 @@ #endif BUILTIN("popd", 0, bin_cd, 0, 2, BIN_POPD, NULL, NULL), - BUILTIN("print", BINF_PRINTOPTS, bin_print, 0, -1, BIN_PRINT, "RDPnrslzNu0123456789pioOcm-", NULL), + BUILTIN("print", BINF_PRINTOPTS, bin_print, 0, -1, BIN_PRINT, "RDPbnrslzNu0123456789pioOcm-", NULL), BUILTIN("pushd", 0, bin_cd, 0, 2, BIN_PUSHD, NULL, NULL), BUILTIN("pushln", BINF_PRINTOPTS, bin_print, 0, -1, BIN_PRINT, NULL, "-nz"), BUILTIN("pwd", 0, bin_pwd, 0, 0, 0, "rLP", NULL), @@ -2512,8 +2512,8 @@ if (!ops['e'] && (ops['R'] || ops['r'] || ops['E'])) unmetafy(args[n], &len[n]); else - args[n] = getkeystring(args[n], &len[n], - func != BIN_ECHO && !ops['e'], &nnl); + args[n] = getkeystring(args[n], &len[n], ops['b'] ? 2 : + (func != BIN_ECHO && !ops['e']), &nnl); /* -P option -- interpret as a prompt sequence */ if(ops['P']) { /* -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy