Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: 3.1.5-pws-8: init, dump: more formatting nonsense
- X-seq: zsh-workers 5413
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: PATCH: 3.1.5-pws-8: init, dump: more formatting nonsense
- Date: Wed, 17 Feb 1999 17:25:48 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author