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

Re: _call_program (and possibly other hooks) or opt_args quoting prob lem.

On May 18,  3:24pm, Borsenkow Andrej wrote:
} Still even with the following:
} if zstyle -s ":completion:${curcontext}:${1}" command tmp; then
}   if [[ "$tmp" = -* ]]; then
}     eval "$tmp[2,-1]" "${(qqq)argv[2,-1]}"
}   else
}     eval "$tmp"
}   fi
} else
}   eval "${(@qqq)argv[2,-1]}"
} fi
} I get 
} +_info:27> info=( _call_program info info -d $PWD/a b ) 

I don't have this _info completion function, so I'm having a hard time
coming up with a way to reproduce this.

Perhaps "${(@qqq)${(@e)argv[2,-1]}}" ?

Or perhaps drop the `eval' and just use "${(@e)argv[2,-1]}}" directly in
the latter branch -- the only reason I can think of for the `eval' to be
there is to expand aliases, and I wouldn't think we'd want to do that when
inside _call_program, but I could be wrong.

} Actually I begin to feel that _arguments should eval parameter value
} before storing it. Can anybody give example when parameter value as it
} appears on command line is useful? 

I'm not sure what you mean by "parameter value as it appears" -- is the
word "value" out of place in that phrase?

What about the _expand completer?

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   

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