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

Re: PATCH: tricky.c and completion functions



In article <990813155515.ZM5338@xxxxxxxxxxxxxxxxxxxxxxx>,
  "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx> writes:

> That (N) shouldn't be necessary -- brace expansion does not test for the
> exsistence of any files, it just pastes together the strings in all the
> possible combinations.  Did it actually fail for you somehow?

It is required for removing non-existing files from the result of
the brace expansion.

For example, under SunOS 5.7:

Z(2):akr@is27e1u11% print -l /usr/{lib,{{X11R6,openwin},local{,/X11{,R6}}}/lib}/X11/rgb.txt
/usr/lib/X11/rgb.txt
/usr/X11R6/lib/X11/rgb.txt
/usr/openwin/lib/X11/rgb.txt
/usr/local/lib/X11/rgb.txt
/usr/local/X11/lib/X11/rgb.txt
/usr/local/X11R6/lib/X11/rgb.txt
Z(2):akr@is27e1u11% print -l /usr/{lib,{{X11R6,openwin},local{,/X11{,R6}}}/lib}/X11/rgb.txt(N)
/usr/openwin/lib/X11/rgb.txt
Z(2):akr@is27e1u11% 

So, $(<$files[1]) causes an error if (N) is not used.

Also, I suppose that (N) was intended by Sven because
Completion/User/_cursors use same method for cursorfont.h.
-- 
Tanaka Akira



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