zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: file descriptor completion
@ 2008-11-10 17:09 Oliver Kiddle
  0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2008-11-10 17:09 UTC (permalink / raw)
  To: Zsh workers

_file_descriptors wasn't working properly on Solaris where /proc/$$/fd
exists but it's contents are not symbolic links. This fixes it.

Oliver

Index: Completion/Zsh/Type/_file_descriptors
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Zsh/Type/_file_descriptors,v
retrieving revision 1.6
diff -u -r1.6 _file_descriptors
--- Completion/Zsh/Type/_file_descriptors	3 Jun 2008 09:30:58 -0000	1.6
+++ Completion/Zsh/Type/_file_descriptors	10 Nov 2008 17:03:08 -0000
@@ -2,9 +2,9 @@
 
 local i fds expl list link sep
 
-for i in {0..9}; [[ -e /dev/fd/$i ]] && fds+=( $i )
+fds=( /dev/fd/<0-9>(N:t) )
 
-if zstyle -T ":completion:${curcontext}:" verbose && [[ -e /proc/$$/fd ]]; then
+if zstyle -T ":completion:${curcontext}:" verbose && [[ -h /proc/$$/fd/$fds[1] ]]; then
   zstyle -s ":completion:${curcontext}:" list-separator sep || sep=--
 
   if zmodload -F zsh/stat b:zstat; then


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-10 17:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-10 17:09 PATCH: file descriptor completion Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).