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

Re: PATCH: Improve quote handling in _ant completion




$ln could have quotes in the description. For example "Run tests but don't do fail"
Those are not properly handled today, since eval will complain about unmatched quotes

About the current code:

   print -n "'${default_target}:(Default target) ' "

The extra space after the ')' is no needed. It causes no big harm, but it's not needed.


Germán Riaño, Ph. D. http://GermanRiano.com Seattle, WA, USA


On Wednesday, November 29, 2023 at 06:41:03 PM PST, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:


On Wed, Nov 29, 2023 at 5:28 PM German Riano <griano@xxxxxxxxx> wrote:

>
> Sorry, I mean '-r', not '-q'.  In other words, this seems to work: 'print -rn "'$ln' ". But (qq) looks better


Is there a reason $ln could not have any single-quotes in it?

The other thing puzzling me a little, is why this line (original source)

  print -n "'${default_target}:(Default target) ' "

has a space both inside and outside the closing single quote?  Why are
both needed?  Whereas this

  print -n "'$ln' "

has a space only following the single quote.  Does $ln always already
end in a space?

I don't have and have never used ant.



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