zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh users <zsh-users@sunsite.dk>
Subject: Re: The (X) flag.
Date: Tue, 27 Jun 2006 23:51:16 -0700	[thread overview]
Message-ID: <060627235116.ZM19160@torch.brasslantern.com> (raw)
In-Reply-To: <20060628045752.GN6528@fsst.voodoo.lan>

On Jun 28,  6:57am, Frank Terbeck wrote:
}
} Now I thought it might throw an error when a given pattern doesn't
} match:

No.  Failing to match the pattern is not an error, it's one of the
expected possible outcomes.

} However, I guess, I'm misunderstanding the manual. So, could someone
} please give an example of what this flag does?

The errors involved are lexical errors, that is, failures in tokenizing
the string.  I can't immediately think of one that affects ${var#pat},
but here's an obvious one with the (Q) flag:

    % foo="two ' matched ' quotes"
    % print ${(Q)foo}
    two  matched  quotes
    % foo="only one ' quote"
    % print ${(Q)foo}
    only one ' quote
    % print ${(XQ)foo}
    zsh: unmatched '
    % 


  reply	other threads:[~2006-06-28  6:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-28  4:57 Frank Terbeck
2006-06-28  6:51 ` Bart Schaefer [this message]
2006-06-28  7:04   ` Frank Terbeck

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=060627235116.ZM19160@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@sunsite.dk \
    /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).