From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9277 invoked from network); 2 Jul 1997 04:20:49 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 2 Jul 1997 04:20:49 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id XAA03488; Tue, 1 Jul 1997 23:44:10 -0400 (EDT) Resent-Date: Tue, 1 Jul 1997 23:44:10 -0400 (EDT) Message-Id: X-Aliased: From ingo@malachit.Informatik.Uni-Oldenburg.DE (Ingo Wilken) From: "Ingo Wilken" Subject: Completion bug introduced in 3.0.3 To: zsh-workers@math.gatech.edu Date: Wed, 2 Jul 1997 05:48:21 +0200 (MET DST) Cc: ingo@malachit.Informatik.Uni-Oldenburg.DE (Ingo Wilken) X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Resent-Message-ID: <"L8CMO3.0.Rs.AwSkp"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3329 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Hi, I just upgraded from zsh 3.0.0 to 3.0.4 and noticed a severe bug with filename completion in multiple-line commands. I build all intermediate versions, and noticed that this bug was introduced with 3.0.3. I am in a directory with several hundred files (and some pretty long names), and want to move them to another directory, with some prefix added to all the names. I type: ingo@icicle:/some/where/m1000> for i in * > do > mv -i $i ../m I use autolist and automenu, so zsh should now print the possible matches (in this case, m1000 and m980), but it does more than that: It adds a copy of the uncompleted line to the script. This copy also appears on the screen: ingo@icicle:/some/where/m1000> for i in * > do > mv -i $i ../m mv -i $i ../m m1000 m980 > mv -i $i ../m[] mv -i $i ../m [] is the cursor. I can complete the line with automenu without problems, but the script now contains two "mv" commands, which of course produce lots of errors. Going back in the history: ingo@icicle:/some/where/m1000> for i in * do mv -i $i ../m980/foo_$i <-- line completed with automenu & some typing mv -i $i ../m <-- copy produced by completion done If I switch autolist and automenu off, hitting repeatedly creates even more dupes: ingo@icicle:/some/where/m1000> for i in * > do > mv -i $i ../m[] mv -i $i ../m mv -i $i ../m mv -i $i ../m This bug is in 3.0.3 and 3.0.4, 3.0.0 to 3.0.2 worked fine. Another thing: I use a TCL script that sets its stdout stream to non-blocking. This somehow affects zsh, as all interactive commands started after the TCL script (like "ftp" or "more") immediately terminate upon trying to get some user input: ingo@icicle:~> tclsh % fconfigure stdout -blocking 0 % exit ingo@icicle:~> ftp ingo@icicle:~> <-- zsh prompt, ftp terminated immediatly Other shells, for example bash and tcsh, are immune to this. My machine is a P133 with 64MB RAM, running Linux 2.0.30. I added the output of the reporter script below. Regards, Ingo # START zsh saveset # uname: Linux icicle 2.0.30 #31 Wed Jun 25 10:17:55 MET DST 1997 i586 # Aliases. alias ..='cd ..' alias cls=clear alias la=ls alias ll='ls -l' alias run-help=man alias which-command=whence alias xim='xterm -e vim' alias xt='echo -n '\'']0;icicle'\' alias xx='echo c' # Key bindings. bindkey -r "^@" bindkey -r "^A" bindkey -r "^B" bindkey -r "^C" bindkey -r "^D" bindkey -r "^E" bindkey -r "^F" bindkey -r "^G" bindkey -r "^H" bindkey -r "^I" bindkey -r "^J" bindkey -r "^K" bindkey -r "^L" bindkey -r "^M" bindkey -r "^N" bindkey -r "^O" bindkey -r "^P" bindkey -r "^Q" bindkey -r "^R" bindkey -r "^S" bindkey -r "^T" bindkey -r "^U" bindkey -r "^V" bindkey -r "^W" bindkey -r "^X" bindkey -r "^Y" bindkey -r "^Z" bindkey -r "\e" bindkey -r "^_" bindkey -r "^?" bindkey -r "^X^B" bindkey -r "^X^F" bindkey -r "^X^J" bindkey -r "^X^K" bindkey -r "^X^N" bindkey -r "^X^O" bindkey -r "^X^U" bindkey -r "^X^V" bindkey -r "^X^X" bindkey -r "^X*" bindkey -r "^XG" bindkey -r "^Xg" bindkey -r "^Xr" bindkey -r "^Xs" bindkey -r "^Xu" bindkey -r "\e^D" bindkey -r "\e^G" bindkey -r "\e^H" bindkey -r "\e^I" bindkey -r "\e^J" bindkey -r "\e^L" bindkey -r "\e^M" bindkey -r "\e^_" bindkey -r "\e " bindkey -r "\e!" bindkey -r "\e\\"" bindkey -r "\e$" bindkey -r "\e'" bindkey -r "\e-" bindkey -r "\e." bindkey -r "\e0" bindkey -r "\e1" bindkey -r "\e2" bindkey -r "\e3" bindkey -r "\e4" bindkey -r "\e5" bindkey -r "\e6" bindkey -r "\e7" bindkey -r "\e8" bindkey -r "\e9" bindkey -r "\e<" bindkey -r "\e>" bindkey -r "\e?" bindkey -r "\eA" bindkey -r "\eB" bindkey -r "\eC" bindkey -r "\eD" bindkey -r "\eF" bindkey -r "\eG" bindkey -r "\eH" bindkey -r "\eL" bindkey -r "\eN" bindkey -r "\eP" bindkey -r "\eQ" bindkey -r "\eS" bindkey -r "\eT" bindkey -r "\eU" bindkey -r "\eW" bindkey -r "\e[1~" bindkey -r "\e[3~" bindkey -r "\e[4~" bindkey -r "\e[5~" bindkey -r "\e[6~" bindkey -r "\e[A" bindkey -r "\e[B" bindkey -r "\e[C" bindkey -r "\e[D" bindkey -r "\e_" bindkey -r "\ea" bindkey -r "\eb" bindkey -r "\ec" bindkey -r "\ed" bindkey -r "\ef" bindkey -r "\eg" bindkey -r "\eh" bindkey -r "\el" bindkey -r "\en" bindkey -r "\ep" bindkey -r "\eq" bindkey -r "\es" bindkey -r "\et" bindkey -r "\eu" bindkey -r "\ew" bindkey -r "\ex" bindkey -r "\ey" bindkey -r "\ez" bindkey -r "\e|" bindkey -r "\e^?" bindkey "^@" set-mark-command bindkey "^A" beginning-of-line bindkey "^B" backward-char bindkey "^C" undefined-key bindkey "^D" delete-char-or-list bindkey "^E" end-of-line bindkey "^F" forward-char bindkey "^G" send-break bindkey "^H" backward-delete-char bindkey "^I" expand-or-complete bindkey "^J" accept-line bindkey "^K" kill-line bindkey "^L" clear-screen bindkey "^M" accept-line bindkey "^N" down-line-or-history bindkey "^O" accept-line-and-down-history bindkey "^P" up-line-or-history bindkey "^Q" push-line bindkey "^R" history-incremental-search-backward bindkey "^S" history-incremental-search-forward bindkey "^T" transpose-chars bindkey "^U" kill-whole-line bindkey "^V" quoted-insert bindkey "^W" backward-kill-word bindkey "^X" prefix bindkey "^Y" yank bindkey "^Z" undefined-key bindkey "\e" prefix bindkey "^_" undo bindkey "^?" backward-delete-char bindkey "^X^B" vi-match-bracket bindkey "^X^F" vi-find-next-char bindkey "^X^J" vi-join bindkey "^X^K" kill-buffer bindkey "^X^N" infer-next-history bindkey "^X^O" overwrite-mode bindkey "^X^U" undo bindkey "^X^V" vi-cmd-mode bindkey "^X^X" exchange-point-and-mark bindkey "^X*" expand-word bindkey "^XG" list-expand bindkey "^Xg" list-expand bindkey "^Xr" history-incremental-search-backward bindkey "^Xs" history-incremental-search-forward bindkey "^Xu" undo bindkey "\e^D" list-choices bindkey "\e^G" send-break bindkey "\e^H" backward-kill-word bindkey "\e^I" self-insert-unmeta bindkey "\e^J" self-insert-unmeta bindkey "\e^L" clear-screen bindkey "\e^M" self-insert-unmeta bindkey "\e^_" copy-prev-word bindkey "\e " expand-history bindkey "\e!" expand-history bindkey "\e\\"" quote-region bindkey "\e$" spell-word bindkey "\e'" quote-line bindkey "\e-" neg-argument bindkey "\e." insert-last-word bindkey "\e0" digit-argument bindkey "\e1" digit-argument bindkey "\e2" digit-argument bindkey "\e3" digit-argument bindkey "\e4" digit-argument bindkey "\e5" digit-argument bindkey "\e6" digit-argument bindkey "\e7" digit-argument bindkey "\e8" digit-argument bindkey "\e9" digit-argument bindkey "\e<" beginning-of-buffer-or-history bindkey "\e>" end-of-buffer-or-history bindkey "\e?" which-command bindkey "\eA" accept-and-hold bindkey "\eB" backward-word bindkey "\eC" capitalize-word bindkey "\eD" kill-word bindkey "\eF" forward-word bindkey "\eG" get-line bindkey "\eH" run-help bindkey "\eL" down-case-word bindkey "\eN" history-search-forward bindkey "\eP" history-search-backward bindkey "\eQ" push-line bindkey "\eS" spell-word bindkey "\eT" transpose-words bindkey "\eU" up-case-word bindkey "\eW" copy-region-as-kill bindkey "\e[1~" beginning-of-line bindkey "\e[3~" delete-char bindkey "\e[4~" end-of-line bindkey "\e[5~" history-search-backward bindkey "\e[6~" history-search-forward bindkey "\e[A" up-line-or-history bindkey "\e[B" down-line-or-history bindkey "\e[C" forward-char bindkey "\e[D" backward-char bindkey "\e_" insert-last-word bindkey "\ea" accept-and-hold bindkey "\eb" backward-word bindkey "\ec" capitalize-word bindkey "\ed" kill-word bindkey "\ef" forward-word bindkey "\eg" get-line bindkey "\eh" run-help bindkey "\el" down-case-word bindkey "\en" history-search-forward bindkey "\ep" history-search-backward bindkey "\eq" push-line bindkey "\es" spell-word bindkey "\et" transpose-words bindkey "\eu" up-case-word bindkey "\ew" copy-region-as-kill bindkey "\ex" execute-named-cmd bindkey "\ey" yank-pop bindkey "\ez" execute-last-named-cmd bindkey "\e|" vi-goto-column bindkey "\e^?" backward-kill-word # Completions. compctl -b bindkey compctl -c builtin compctl -v export compctl -o setopt compctl -v typeset compctl -v unset compctl -o unsetopt compctl -v vared compctl -c which compctl -C -c compctl -D -f compctl -T # Undefined functions. # Defined functions. # Limits. limit stacksize 8MB limit coredumpsize 0kB limit maxproc 256 limit descriptors 256 # Non-array variables. TERMCAP='xterm|vs100|xterm terminal emulator (X window system):do=^J:le=^H:ho=\E[H:co#80:li#24:cl=\E[H\E[2J:bs:am:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:md=\E[1m:mr=\E[7m:me=\E[m:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sf= :sr=\EM:al=\E[L:dl=\E[M:im=\E[4h:ei=\E[4l:mi:dc=\E[P:MT:ks=\E[?1h\E=:ke=\E[?1l\E>:xn:AL=\E[%dL:DL=\E[%dM:DC=\E[%dP:hs:ts=\E[?E\E[?%i%dT:fs=\E[?F:es:ds=\E[?E:is=\E\E[m\E[?7h\E[?1;4l:cs=\E[%i%d;%dr:rs=\E[r\E<\E[m\E[H\E[2J\E[?7h\E[?1;3;4;6l:' TERM='xterm' \'#\'="0" \'$\'="20188" \'?\'="0" ARGC="0" AWK="awk" BAUD="9600" CDPATH="\'\'" COLUMNS="80" CPP="/lib/cpp" DISPLAY=":0.0" EGID="100" ERRNO="0" EUID="500" FCEDIT="vi" FIGNORE="\'\'" FPATH="\'\'" GID="100" HISTCHARS="\'!^#\'" HISTSIZE="30" HOME="/home/ingo" HOST="icicle" HOSTNAME="icicle" INPUTRC="/etc/inputrc" IRCNAME="\'Ingo Wilken\'" IRCNICK="Nobody" IRCSERVER="irc.fu-berlin.de" KEYTIMEOUT="40" LD_LIBRARY_PATH=":/usr/local/lib:/usr/local/tcl/lib:/usr/local/tcl8.x/lib:/usr/local/lib:/usr/local/tcl/lib:/usr/local/tcl8.x/lib" LESS="-MM" LESSOPEN="\'|lesspipe.sh %s\'" LINENO="329" LINES="24" LISTMAX="100" LOGCHECK="60" LOGNAME="ingo" LS_COLORS="\'no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:\'" MACHTYPE="i586" MAIL="/var/spool/mail/ingo" MAILCHECK="60" MAILPATH="\'\'" MANPATH="/usr/local/man:/usr/man/preformat:/usr/man:/usr/X11/man:/usr/local/tcl/man:/usr/local/pbm/man:/usr/local/games/man" MINICOM="\'-c on\'" MODEM="/dev/modem" NETHACKOPTIONS="rest_on_space,nopickup,catname:Sylvester,dogname:Brutus,fruit:Mango" NNTPSERVER="\'\'" NULLCMD="cat" OLDPWD="/usr/src/zsh-3.0.3" OPTARG="\'\'" OPTIND="1" OSTYPE="linux" PATH="\'/usr/local/bin:/bin:/usr/bin:/usr/X11/bin:/bin:/usr/local/tcl/bin:/usr/local/pbm/bin:/usr/local/games/bin:~/bin:.:/usr/local/sbin::/usr/local/sbin::/usr/local/sbin:\'" POSTEDIT="\'\'" PPID="4389" PROMPT="\'%n@%m:%~> \'" PROMPT2="\'> \'" PROMPT3="\'?# \'" PROMPT4="\'+ \'" PS1="\'%n@%m:%~> \'" PS2="\'> \'" PS3="\'?# \'" PS4="\'+ \'" PSVAR="\'\'" PWD="/usr/src/zsh-3.0.3/Util" RANDOM="31392" READNULLCMD="more" RPROMPT="\'[%D{%a %d %b, %H:%M:%S}]\'" RPS1="\'[%D{%a %d %b, %H:%M:%S}]\'" SECONDS="12" SHELL="/bin/zsh" SHLVL="3" SPROMPT="\'zsh: correct \'\\'\'%R\'\\'\' to \'\\'\'%r\'\\'\' [nyae]? \'" TCL_LIBRARY="/usr/local/tcl/lib/tcl7.5" TIMEFMT="\'%J %U user %S system %P cpu %*E total\'" TK_LIBRARY="/usr/local/tcl/lib/tk4.1" TMPPREFIX="/tmp/zsh" TTY="/dev/ttyp2" TTYIDLE="-1" UID="500" USERNAME="ingo" VENDOR="pc" WATCH="\'\'" WATCHFMT="\'%n has %a %l from %m.\'" WINDOWID="16777229" WORDCHARS="\'*?_-.[]~=/&;!#$%^(){}<>\'" ZSH_NAME="zsh" ZSH_VERSION="3.0.3" each="/bin" histchars="\'!^#\'" ignoreeof="0" reporter_OSVersion="Linux_2.0.30" reporter_junkiequotes="no" status="0" str="\'Linux icicle 2.0.30 #31 Wed Jun 25 10:17:55 MET DST 1997 i586\'" prompt='test%' # Array variables. argv=() '*'=() cdpath=() fignore=() fpath=() mailpath=() manpath=(/usr/local/man /usr/man/preformat /usr/man /usr/X11/man /usr/local/tcl/man /usr/local/pbm/man /usr/local/games/man) path=(/usr/local/bin /bin /usr/bin /usr/X11/bin /bin /usr/local/tcl/bin /usr/local/pbm/bin /usr/local/games/bin '~/bin' . /usr/local/sbin '' /usr/local/sbin '' /usr/local/sbin '') psvar=() signals=(EXIT HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR UNUSED ZERR DEBUG) watch=() # Exported variables. export TERMCAP export TERM export COLUMNS=80 export DISPLAY=:0.0 export HOME=/home/ingo export HOSTNAME=icicle export INPUTRC=/etc/inputrc export IRCNAME='Ingo Wilken' export IRCNICK=Nobody export IRCSERVER=irc.fu-berlin.de export LD_LIBRARY_PATH=:/usr/local/lib:/usr/local/tcl/lib:/usr/local/tcl8.x/lib:/usr/local/lib:/usr/local/tcl/lib:/usr/local/tcl8.x/lib export LESS=-MM export LESSOPEN='|lesspipe.sh %s' export LINES=24 export LOGNAME=ingo export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:' export MAIL=/var/spool/mail/ingo export MANPATH=/usr/local/man:/usr/man/preformat:/usr/man:/usr/X11/man:/usr/local/tcl/man:/usr/local/pbm/man:/usr/local/games/man export MINICOM='-c on' export MODEM=/dev/modem export NETHACKOPTIONS=rest_on_space,nopickup,catname:Sylvester,dogname:Brutus,fruit:Mango export NNTPSERVER='' export PATH='/usr/local/bin:/bin:/usr/bin:/usr/X11/bin:/bin:/usr/local/tcl/bin:/usr/local/pbm/bin:/usr/local/games/bin:~/bin:.:/usr/local/sbin::/usr/local/sbin::/usr/local/sbin:' export PROMPT='%n@%m:%~> ' export PS1='%n@%m:%~> ' export PS2='> ' export PWD=/usr/src/zsh-3.0.3/Util export RPROMPT='[%D{%a %d %b, %H:%M:%S}]' export SHELL=/bin/zsh export SHLVL=3 export TCL_LIBRARY=/usr/local/tcl/lib/tcl7.5 export TERM=xterm export TK_LIBRARY=/usr/local/tcl/lib/tk4.1 export WINDOWID=16777229 export ignoreeof=0 # Setopt. setopt autocd setopt autolist setopt automenu setopt extendedglob setopt nobeep # END zsh saveset