Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: psychiatric help
- X-seq: zsh-users 30506
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Ray Andrews <rayandrews@xxxxxxxxxxx>
- Cc: zsh-users@xxxxxxx
- Subject: Re: psychiatric help
- Date: Mon, 6 Apr 2026 15:08:53 -0700
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ZoVdMmhaxQY8ubwydkLtFJ4b6p/bi4PEJmWARjl+dEE=; fh=D6X9xIaVjTSxb6gwuCseglo0uxyISp24IsyxMp5sRU4=; b=RiwDK2doB1OU9W8/l1091ehW4UIN4ciWDyp//LFE699/24ftekskm0ifQmrMdwj7Gj aLR78QeAJKItwuoNwMCxRjqB19k8UTmO6Oq8LjvwyHdZdi6hN/cHzVfj/pMlMtCurtTc VYXWAeLlfKucKc6ydZUzkikM8KNyhKbEneEW6DSJo1NBdtBqd7QUcVSY6lkxbrVW9lXo 0GwZji/iGx1NdDCk7ffYLZC4pdgzMYypoWqHxJsdAYGhCILD7LXI6omjjTD87Atn/rtk d2uvY+H1kecTSkqvYGDZZLaLDxTdxqn5kKfwBhIsj7sbOScDlauSVfxGvyx5fhyNxRJu UxTA==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1775513347; cv=none; d=google.com; s=arc-20240605; b=C2eC8+uGiezwwBMX+PuDDaJKpsfUZpSy8GOWy4tTiXyBpHS6tzbgpchMvirbdZtqiA sJRECX+tpd7brQHJLT62HwpEo78PpyiYpse0wcF+YZ/Y9uk9/NIzUOHDjRr8qnatiV8/ RC5uh2xELBiMzstoyZMjCEFTFFX2bUzyTx9itQ/C5sUKzX9hg8zGqj20z5EAO2464+Km k5JweAp5/sXFMc505sga8kWSg7/0UrKxTaOCCjr/8PYGadvYUqNdfDYHrsvsUka7s28x PWV7oJaOHvfpzlDUcGmFD8CBKdmw12NrjkeOg/cZg60xIMewoPSxJfV7pt9ocz3fBTYE Pfrw==
- Archived-at: <https://zsh.org/users/30506>
- In-reply-to: <e83d6790-8dcf-434f-81a1-3cee383165c8@eastlink.ca>
- List-id: <zsh-users.zsh.org>
- References: <0610849d-f81c-4539-b13d-c4be9cbd1276@eastlink.ca> <CAA=-s3yUhzu7WbAB0F09abwmzPYowJ1s6o+YiV+cuQBf-GvFXw@mail.gmail.com> <448d6d35-c261-4e7e-bc67-c2a58d082b87@eastlink.ca> <CAA=-s3wKQb+1Sq2mV+h2Gk8rOQYKt8x_JNg9NhmdwAgJesxBkQ@mail.gmail.com> <755f4aa9-e27a-4b4d-8f23-add76a13ee83@eastlink.ca> <CAH+w=7Ydks9vqHA8x_zcHq454q8_C49Tq0xqPWuv9ejKYxCoOA@mail.gmail.com> <fcd552e0-d0eb-4443-bf6a-8ba11663638f@eastlink.ca> <CAH+w=7aksiqTuN4A_203YDWd9RfBwq2X83Oo9z0=45Md6aeWSg@mail.gmail.com> <e2d7c5e8-b994-4f38-8396-c21d493a617b@eastlink.ca> <CAH+w=7abnQZxhPc8AfsOxenKFL5tWce9A52GXv7m9rHh5eXHGw@mail.gmail.com> <d0c21ec7-832b-4ac5-a855-4b914827c61d@eastlink.ca> <CAH+w=7bW3Y921rXQmWvKT03Jv25T+o_FQOjk2VdHTnrq2+abAQ@mail.gmail.com> <00200287-37cf-4c9e-a3fa-0cd1d3eb0525@eastlink.ca> <CAH+w=7YqmKtewjEO3V7KrJ6kNcEAVE36O_L6T7AfbmA4MbhteQ@mail.gmail.com> <595fea9f-942d-4d08-963f-ece43c32979a@eastlink.ca> <CAH+w=7br+GP=rwDy=ywuDwftQy2to0yUS4reSVAypyK7yvUrcg@mail.gmail.com> <e83d6790-8dcf-434f-81a1-3cee383165c8@eastlink.ca>
On Mon, Apr 6, 2026 at 2:33 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> print -rS "$~@" # Easy. No fuss, no muss, no bother.
This is wrong for several reasons:
1) The ~ isn't helping anything because it means to enable globbing,
but then the whole thing is in quotes which means among other things
not to glob.
2) print -S expects a single word, but "$@" is an array any time $# is 2 or more
I think you mean
print -rS -- "$*" # one word, history re-parses it
> _execute_output="$( eval "$~@" )" # Save output to an array variable.
Again, "eval" is doing all the work here and the ~ isn't helping.
> > Another problem is that what we're calling 3a is constantly changing.
> Wouldn't it be whatever command it about to be executed?
During processing of a function body, everything in that body is at
some point a command about to be executed.
foo() {
# Before foo starts, 3a might be what you want
setopt localoptions extendedglob # Oops, new 3a
args_of_foo=( $@ ) # 3a just changed again
# and so on
}
How do you tell the shell when to "grab" 3a?
> eval "$~@"
>
> ... without the eval
You probably mean
output=$( ${(e)~@} )
that is
-- remove the quotes to allow expansion
-- (e) to expand embedded $var
-- tilde to enable globbing
Or maybe you don't want the (e), I have no idea what $@ values are at
this point.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author