* PATCH: 3.1.5-pws-8: init, dump: more formatting nonsense
@ 1999-02-17 16:25 Peter Stephenson
0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 1999-02-17 16:25 UTC (permalink / raw)
To: Zsh hackers list
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-02-17 16:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-17 16:25 PATCH: 3.1.5-pws-8: init, dump: more formatting nonsense Peter Stephenson
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).