zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: Zsh Users <zsh-users@zsh.org>
Subject: (j.|.)
Date: Tue, 31 Jan 2023 08:38:26 -0800	[thread overview]
Message-ID: <754f2048-2882-b7a9-560b-7c0564ac112b@eastlink.ca> (raw)

Bart:

Your clipped comments and code:

# ${(j.|.)var} means to join an array with vertical bars; here the var 
is @ for the positional parameters.

# ${~something} means the value of something can be treated as a 
pattern, so the |-joined positional parameters form a pattern.

# "set --" replaces the original positional parameters with this array 
of parameter names.

set -- ${(ok)parameters[(I)${_v_case}${~${(j.|.)@}}]}

... I understand everything but the '(j.|.)' -- it seems ok like this:

     set -- ${(ok)parameters[(I)${_v_case}${~${@}}]}

... I see no vertical bars either before or after.  The PP's print as a 
spaced array either way.  But  you didn't but that in for no reason.  
Besides, the idea of joining the array seems backwards.





             reply	other threads:[~2023-01-31 16:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 16:38 Ray Andrews [this message]
2023-01-31 16:41 ` (j.|.) Roman Perepelitsa
2023-01-31 16:49   ` (j.|.) Ray Andrews
2023-01-31 17:50     ` (j.|.) Ray Andrews
2023-01-31 18:10       ` (j.|.) Roman Perepelitsa
2023-01-31 19:13         ` (j.|.) Ray Andrews
2023-01-31 20:19           ` (j.|.) Roman Perepelitsa
2023-01-31 21:50             ` (j.|.) Ray Andrews
2023-01-31 23:33               ` (j.|.) Lawrence Velázquez
2023-02-01  0:21                 ` (j.|.) Ray Andrews
2023-02-01  1:33                   ` (j.|.) Lawrence Velázquez
2023-02-01  1:59                     ` (j.|.) Ray Andrews
2023-02-01  2:14                       ` (j.|.) Ray Andrews
2023-02-01 22:47                         ` (j.|.) Ray Andrews
2023-02-02  0:43                           ` (j.|.) Lawrence Velázquez
2023-02-02  1:21                             ` (j.|.) Ray Andrews

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=754f2048-2882-b7a9-560b-7c0564ac112b@eastlink.ca \
    --to=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).