From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: PATCH: 3.1.5-pws-8: init, dump: more formatting nonsense
Date: Wed, 17 Feb 1999 17:25:48 +0100 [thread overview]
Message-ID: <9902171625.AA45163@ibmth.df.unipi.it> (raw)
This time, I've just noticed that some of my backslashes in things
like `bindkey "\M-x." ...' are going astray in both init and dump, due to
the habit of read and print without -r of swallowing up backslashes.
--- Functions/Completion/dump.bk Wed Feb 17 17:06:24 1999
+++ Functions/Completion/dump Wed Feb 17 17:23:26 1999
@@ -48,16 +48,16 @@
# Here, we need both the zle -C's and the bindkey's to recreate.
__d_bks=()
zle -lL |
- while read -A __d_line; do
+ while read -rA __d_line; do
if [[ ${__d_line[5]} = __main_key_complete ]]; then
- print - ${__d_line}
+ print -r - ${__d_line}
__d_bks=($__d_bks ${__d_line[3]})
fi
done
bindkey |
- while read -A __d_line; do
+ while read -rA __d_line; do
if [[ ${__d_line[2]} = (${(j.|.)~__d_bks}) ]]; then
- print "bindkey '${__d_line[1][2,-2]}' ${__d_line[2]}"
+ print -r "bindkey '${__d_line[1][2,-2]}' ${__d_line[2]}"
fi
done
fi
@@ -69,8 +69,8 @@
# all functions beginning with `__'.
__d_als=($(whence -wm '__*' |
-while read -A __d_line; do
- [[ ${__d_line[2]} = function ]] && print - ${__d_line[1]%:}
+while read -rA __d_line; do
+ [[ ${__d_line[2]} = function ]] && print -r - ${__d_line[1]%:}
done))
# print them out: about six to a line looks neat
@@ -96,7 +96,7 @@
typeset -A __d_zle
__d_bks=''
-bindkey | while read -A __d_line; do
+bindkey | while read -rA __d_line; do
if [[ "$__d_line[2]" = \
__complete_(expand-or-complete(-prefix|)|complete-word|list-choices\
|delete-char-or-list|menu-(expand-or-|)complete|reverse-menu-complete) ]]; then
@@ -111,6 +111,6 @@
done
print -l - "${(@ov)__d_zle}"
-print - "$__d_bks"
+print -r - "$__d_bks"
unset __d_line __d_zle __d_bks __d_als __d_f
--- Functions/Completion/init.bk Wed Feb 17 17:20:46 1999
+++ Functions/Completion/init Wed Feb 17 17:20:50 1999
@@ -249,7 +249,7 @@
# Finally we make all this be called by changing the key bindings.
- bindkey | while read -A __i_line; do
+ bindkey | while read -rA __i_line; do
if [[ "$__i_line[2]" = complete-word ||
"$__i_line[2]" = delete-char-or-list ||
"$__i_line[2]" = expand-or-complete ||
--
Peter Stephenson <pws@ibmth.df.unipi.it> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
reply other threads:[~1999-02-17 16:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9902171625.AA45163@ibmth.df.unipi.it \
--to=pws@ibmth.df.unipi.it \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).