zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: German Riano <griano@yahoo.com>
Cc: Mikael Magnusson <mikachu@gmail.com>,
	"zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: PATCH: Improve quote handling in _ant completion
Date: Sat, 2 Dec 2023 15:21:12 -0800	[thread overview]
Message-ID: <CAH+w=7Y2Jz4kdmsQtgYZDfYc=j+T+Us+GCOoCtm_-xrzdjSH7A@mail.gmail.com> (raw)
In-Reply-To: <1631564887.2097420.1701458403629@mail.yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 403 bytes --]

On Fri, Dec 1, 2023 at 11:20 AM German Riano <griano@yahoo.com> wrote:
>
> $ln could have quotes in the description. For example "Run tests but don't do fail"
> [...]
>
>    print -n "'${default_target}:(Default target) ' "
>
> The extra space after the ')' is no needed. It causes no big harm, but it's not needed.

Apologies again for accidentally squirting this into an unrelated thread.

[-- Attachment #2: targets-_ant.txt --]
[-- Type: text/plain, Size: 856 bytes --]

diff --git a/Completion/Unix/Command/_ant b/Completion/Unix/Command/_ant
index 36c7c0e89..91428b854 100644
--- a/Completion/Unix/Command/_ant
+++ b/Completion/Unix/Command/_ant
@@ -122,13 +122,13 @@ case $state in
                         read default_target junk
                     fi
                     # Output target again indicating its the default one.
-                    print -n "'${default_target}:(Default target) ' "
+                    print -rn -- "${(qq):-${default_target}:(Default target)} "
                 ;;
                 (Searching:*|Main:targets:|Subtargets:|BUILD:SUCCESSFUL|Total:time:*)
                 ;;
                 (*)
                     # Return target and description
-                    print -n "'$ln' "
+                    print -rn -- "${(qq)ln} "
                 ;;
             esac
           done

  reply	other threads:[~2023-12-02 23:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <207461559.9336309.1701221332233.ref@mail.yahoo.com>
2023-11-29  1:28 ` German Riano
2023-11-29 19:18   ` Bart Schaefer
2023-11-29 19:19     ` Bart Schaefer
2023-11-29 19:56     ` Mikael Magnusson
2023-11-29 23:44       ` Bart Schaefer
2023-11-30  0:15         ` German Riano
2023-11-30  0:52           ` Bart Schaefer
2023-11-30  1:28             ` German Riano
2023-11-30  2:40               ` Bart Schaefer
2023-12-01 19:20                 ` German Riano
2023-12-02 23:21                   ` Bart Schaefer [this message]
2023-12-02 23:31       ` Bart Schaefer
2023-12-03 21:08         ` Oliver Kiddle
2023-12-04  0:05           ` Bart Schaefer
2023-12-04  0:11             ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7Y2Jz4kdmsQtgYZDfYc=j+T+Us+GCOoCtm_-xrzdjSH7A@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=griano@yahoo.com \
    --cc=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).