Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: completion with redirections



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@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author