From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 361 invoked from network); 22 Jan 1999 16:16:13 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 22 Jan 1999 16:16:13 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id LAA25468; Fri, 22 Jan 1999 11:12:17 -0500 (EST) Resent-Date: Fri, 22 Jan 1999 11:12:17 -0500 (EST) Date: Fri, 22 Jan 1999 17:11:12 +0100 (MET) Message-Id: <199901221611.RAA27484@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@math.gatech.edu Subject: PATCH: completion with redirections Resent-Message-ID: <"Yp35G2.0.tD6.XDAgs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4951 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Completion always had the problem that it counted redirections appearing in the command line as arguments if you were not completing the string (filename) after the redirection operator itself. The patch below tries to avoid this. It seems to work under several circumstances. (But it looks suspiciously simple, doesn't it?) Bye Sven *** os/Zle/zle_tricky.c Fri Jan 22 17:06:30 1999 --- Src/Zle/zle_tricky.c Fri Jan 22 17:06:37 1999 *************** *** 1011,1017 **** rd = linredir; if (inwhat == IN_NOTHING && incond) inwhat = IN_COND; ! } if (!tokstr) continue; /* Hack to allow completion after `repeat n do'. */ --- 1011,1018 ---- rd = linredir; if (inwhat == IN_NOTHING && incond) inwhat = IN_COND; ! } else if (linredir) ! continue; if (!tokstr) continue; /* Hack to allow completion after `repeat n do'. */ -- Sven Wischnowsky wischnow@informatik.hu-berlin.de