Zsh Mailing List Archive
Messages sorted by:
Re: checking for file existence when I don't know the exact name
- X-seq: zsh-users 16541
- From: Jérémie Roquet <arkanosis@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: checking for file existence when I don't know the exact name
- Date: Mon, 24 Oct 2011 16:59:43 +0200
- Cc: TJ Luoma <luomat@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=98s6ZOsBF+RI5vznRs7PG22tIVZCIxJwgGIqd/hlkEc=; b=TcdDEHY00B6rWq4XrEtkInv9PFK7J9jsVGYL/+OYa0ZgEAgDkh9Ajlnnl/R4EEfjCX EmJCwWG3JiNbpp9B9dqYTmdo4pJDeUYNbWKOAa/m/zt9v9DhzBnoJQxgz7L7jtf96v0U RJm4dH38cyVlnuZ6rWXHO7JAmwum/GFr/VUUg=
- In-reply-to: <CADjGqHu5B7jhR_kWo9XBth4a94KKW6m3TvQbCMZEKHbuC1G=Mw@mail.gmail.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CADjGqHvFLBemKQBcKymqiR3yYp1Bh9r02xCD8SfgdNOqTsudCg@mail.gmail.com> <CAFOazANBqpr0MdXPMTRCftzszbvtSG1xpYq25teYONk2kXJT_w@mail.gmail.com> <CADjGqHu5B7jhR_kWo9XBth4a94KKW6m3TvQbCMZEKHbuC1G=Mw@mail.gmail.com>
2011/10/24 TJ Luoma <luomat@xxxxxxxxx>:
> 2011/10/24 Jérémie Roquet <arkanosis@xxxxxxxxx>
>> From the man, section “conditional expressions” :
>> “File generation is not performed on any form of argument to
> This isn't file _generation_, is it? Or am I not understanding zsh's terms?
Err, it's file*name* generation, actually. In zsh's terms, filename
generation refers to globbing.
Peter, maybe we should fix the doc there?
> I still don't fully understand why / when to use [[ ]] instead of [ ]
Most of the time, I guess. [[ ]] is part of the syntax and has a
number of advanced features while [ is just a command very similar to
“test” and ] an argument to this command.
Unless you want to keep your scripts portable accross different
shells, of course.
diff --git a/Doc/Zsh/cond.yo b/Doc/Zsh/cond.yo
index 489ee35..71971b4 100644
@@ -184,7 +184,7 @@ enditem()
Normal shell expansion is performed on the var(file), var(string) and
var(pattern) arguments, but the result of each expansion is constrained to
be a single word, similar to the effect of double quotes.
-File generation is not performed on any form of argument to conditions.
+Filename generation is not performed on any form of argument to conditions.
However, pattern metacharacters are active for the var(pattern) arguments;
the patterns are the same as those used for filename generation, see
Messages sorted by: