zsh-users
 help / color / mirror / code / Atom feed
* foo.bar(:r) doesn't work
@ 1998-04-14 23:34 Steve Talley
  1998-04-15  8:30 ` Andrew Main
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Talley @ 1998-04-14 23:34 UTC (permalink / raw)
  To: zsh-users

In zsh-3.1.2, "echo foo.bar(:r)" prints out "foo", whether foo.bar
exists or not.  In 3.1.2-zefram4, I get the error "zsh: no match" when
foo.bar doesn't exist.

Why has this been changed to only work with existing files?  Is there
an option to override this?

Thanks,

Steve


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: foo.bar(:r) doesn't work
  1998-04-14 23:34 foo.bar(:r) doesn't work Steve Talley
@ 1998-04-15  8:30 ` Andrew Main
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Main @ 1998-04-15  8:30 UTC (permalink / raw)
  To: Steve Talley; +Cc: zsh-users

Steve Talley wrote:
>In zsh-3.1.2, "echo foo.bar(:r)" prints out "foo", whether foo.bar
>exists or not.  In 3.1.2-zefram4, I get the error "zsh: no match" when
>foo.bar doesn't exist.

This form was always documented as working only on the names of existing
files.  In prior versions there was special-case code to allow modifiers
to be applied to any string without performing globbing, but in the
glob changes for 3.1.2-zefram4 I simplified things a bit by making this
actually invoke globbing.  A side effect is that things like "foo(M)"
now work as expected.

You can get the effect you want -- applying modifiers to an arbitrary
string -- via parameter expansion: "echo ${${:-foo.bar}:r}" has always
been the correct way to do this.

-zefram


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-04-15  8:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-14 23:34 foo.bar(:r) doesn't work Steve Talley
1998-04-15  8:30 ` Andrew Main

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).