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

Re: Bug#355430: zsh: acroread completion prints debugging information



On Mar 25, 10:11am, Clint Adams wrote:
} Subject: Re: Bug#355430: zsh: acroread completion prints debugging informa
}
} > The way I found this was to do setopt -x before acroread TAB and to
} > see that the loads of extra output I got started after evaluating line
} > 7 of _acroread which shown here including the preceding comment:
} > 
} >   # Try extracting the version number directly from the executable.
} >   # (This will fail if the executable is a wrapper script for acroread.)
} >   local ver=${${${(f)"$(<$commands[$words[1]])"}:#^ver=*}##ver=}

The comment is misleading.  The test above fails UNLESS the executable
is a shell script, not IF the executable is a shell script.  I'm not
sure if the comment author meant to imply an extra script around the
Adobe-supplied default script, or if he got his semantics backwards.

} What's happening is that that line is being run as "local" without the
} argument.  Why?

My only guess is that it has something to do with NULLGLOB and the junk
that would get spewed out by $(<$command[$words[1]]) in the event that
it really was reading directly from a binary executable.



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