From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4935 invoked from network); 17 Feb 1999 16:42:23 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Feb 1999 16:42:23 -0000 Received: (qmail 19703 invoked by alias); 17 Feb 1999 16:41:48 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5413 Received: (qmail 19695 invoked from network); 17 Feb 1999 16:41:45 -0000 Message-Id: <9902171625.AA45163@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 From: Peter Stephenson 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 Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy