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

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



> Sorry to have taken so long to do this.  The output contains a my
> entire environment among other things, so I was reluctant to just
> blindly paste it into a bug report without further study.  Upon
> looking into the problem, it turns out that the problem is caused by
> the fact that my /usr/bin/acroread is this shell script:
> 
> #!/bin/sh
> exec /usr/lib/Acrobat7.0/bin/acroread ${1+"$@"}
> 
> In the olden days, it used to not work to make /usr/bin/acroread a
> link to the actual acroread binary, but this does appear to work now.
> 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=}
> 
> I'm afraid my zsh isn't good enough to figure out what's happening
> there without consulting the manual.  Anyway, it seems this more than
> just fails if acroread is a wrapper, it actually causes this problem.
> 
> If you are able to reproduce the problem by putting the above script
> in your path as acroread, then hopefully I have provided sufficient
> information.  Otherwise, I will sanitize the output that I get so that
> it is suitable for public dissemination.  Anyway, here's the beginning
> of the output:
> 
> integer 10 readonly '!'=0
> integer 10 readonly '#'=0
> integer 10 readonly '$'=25511
[...]

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



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