zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: zsh-users@zsh.org
Subject: Re: How to delete .*.~undo-tree~ files?
Date: Wed, 12 Jun 2024 11:48:21 -0700	[thread overview]
Message-ID: <CAH+w=7YxgsS9hej5tfwOtmdWjj90wxb_g5kGF90MJBDbERzCsQ@mail.gmail.com> (raw)
In-Reply-To: <cfbff5cf-5f0b-4f24-bec4-a1a8640ee67c@eastlink.ca>

On Wed, Jun 12, 2024 at 11:28 AM Ray Andrews <rayandrews@eastlink.ca> wrote:
>
>> On 2024-06-12 10:46, Mark J. Reed wrote:
>>
>> So .*.'~undo-tree~' is still just one string, even though only part of it is in quotation marks.  The part in quotes is not subject to glob expansion; the part not in quotes is.
>
> Pure curiosity, I have no problem to solve, but supposing you did want to break the string up, I suppose you'd have to use an array?  Then perhaps manipulate the elements/words as desired, then recombine?

I'm unclear what you mean by "break the string up".

Placing strings (quoted or not) adjacent to one another in shell is a
straight concatenation, just like separating strings with dot in perl
or plus in Javascript.  Once they're concatenated any quoting is gone
and you just have a single string with no particular rules for how to
break it up again.  You can't recover the original pieces.

So the only way to "break the string up" is never to put it together
in the first place.  Using an array would be one way to do that, but
not necessarily the best way depending on where/how the substrings
originate.


  reply	other threads:[~2024-06-12 18:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12 10:04 Denis Bitouzé
2024-06-12 11:30 ` Marc Chantreux
2024-06-12 12:20   ` Denis Bitouzé
2024-06-12 12:25     ` Andreas Kähäri
2024-06-12 12:50       ` Denis Bitouzé
2024-06-12 17:46         ` Mark J. Reed
2024-06-12 18:28           ` Ray Andrews
2024-06-12 18:48             ` Bart Schaefer [this message]
2024-06-12 21:13               ` Ray Andrews
2024-06-12 13:11       ` Marc Chantreux

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=7YxgsS9hej5tfwOtmdWjj90wxb_g5kGF90MJBDbERzCsQ@mail.gmail.com' \
    --to=schaefer@brasslantern.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).