zsh-users
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: zsh-users@zsh.org
Subject: Re: optimal expansions?
Date: Sun, 21 Apr 2024 16:23:55 +0400	[thread overview]
Message-ID: <CAN=4vMqoWSkGbnDuBqBBfCW602FeROjHV0npQVoTw+phRvZDAg@mail.gmail.com> (raw)
In-Reply-To: <3d15311d-b5fa-4a55-a17e-e61fcdded7d0@eastlink.ca>

On Sat, Apr 20, 2024 at 6:24 PM Ray Andrews <rayandrews@eastlink.ca> wrote:
>
> On 2024-04-20 00:42, Roman Perepelitsa wrote:
>
> >
> >           print -P "%B%2F${pkg//\%/%%}%f%b"
>
> Seems we want '-r' most of the time.  And the '--' should always be there.

The missing `-r` is a bug. It should be there. The `--` in this case
is optional because the positional argument cannot start with a dash.

> To pick nits I want the leading empty line.

It's unusual for a script to print a leading empty line. It's best to
avoid doing unusual and surprising things unless you have a good
reason. In this case I would suggest not printing the leading empty
line in the script. If you need it, print it prior to the invocation:

    print && script

Roman.


  parent reply	other threads:[~2024-04-21 12:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-19 19:22 Ray Andrews
2024-04-19 20:40 ` Lawrence Velázquez
2024-04-19 23:25   ` Ray Andrews
2024-04-20  7:42 ` Roman Perepelitsa
2024-04-20 14:23   ` Ray Andrews
2024-04-20 22:54     ` Lawrence Velázquez
2024-04-20 23:59       ` Ray Andrews
2024-04-21 12:23     ` Roman Perepelitsa [this message]
2024-04-21 14:09       ` Ray Andrews
2024-04-21 14:19         ` Roman Perepelitsa
2024-04-21 16:14           ` Stephane Chazelas
2024-04-21 17:39             ` Roman Perepelitsa
2024-04-21 20:13               ` Stephane Chazelas
2024-04-21 20:46                 ` Lawrence Velázquez

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='CAN=4vMqoWSkGbnDuBqBBfCW602FeROjHV0npQVoTw+phRvZDAg@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=rayandrews@eastlink.ca \
    --cc=zsh-users@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).