zsh-users
 help / color / mirror / code / Atom feed
* Using functions for FNG
@ 2014-07-18 18:45 zzapper
  2014-07-18 19:20 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: zzapper @ 2014-07-18 18:45 UTC (permalink / raw)
  To: zsh-users

Hi

# cyg converts linux path to DOS Path

function cyg() { reply=("$(cygpath -m $REPLY)") }

gvim.exe /c/aax/*(.om[1]+cyg) 

I know reply is a magic variable and can guess how the above works but 
anyone care to explain it?. Obviously a useful techique to be able to apply 
functions to your FNG.

-- 
zzapper
https://twitter.com/dailyzshtip

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com



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

* Re: Using functions for FNG
  2014-07-18 18:45 Using functions for FNG zzapper
@ 2014-07-18 19:20 ` Bart Schaefer
  2014-07-18 20:10   ` zzapper
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2014-07-18 19:20 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 450 bytes --]

On Jul 18, 2014 11:47 AM, "zzapper" <david@rayninfo.co.uk> wrote:
>
> gvim.exe /c/aax/*(.om[1]+cyg)
>
> I know reply is a magic variable and can guess how the above works but
> anyone care to explain it?.

It's in the docs ("man zshexpn" or info section Glob Qualifiers) under the
"e" qualifier [not to be confused with the #e pattern flag].  "+" is a
shorthand synonym for "e" when using function names.

The doc even includes a couple of examples.

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

* Re: Using functions for FNG
  2014-07-18 19:20 ` Bart Schaefer
@ 2014-07-18 20:10   ` zzapper
  0 siblings, 0 replies; 3+ messages in thread
From: zzapper @ 2014-07-18 20:10 UTC (permalink / raw)
  To: zsh-users

Bart Schaefer <schaefer@brasslantern.com> wrote in news:CAH+w=
7aP0kjBXb1p2cupMTjynjXArzFrnC=skUeUezEqcEmq9A@mail.gmail.com:

> man zshexpn

+cmd or estring

http://zsh.sourceforge.net/Doc/Release/Expansion.html#Glob-Qualifiers

-- 
zzapper
https://twitter.com/dailyzshtip

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com



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

end of thread, other threads:[~2014-07-18 20:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-18 18:45 Using functions for FNG zzapper
2014-07-18 19:20 ` Bart Schaefer
2014-07-18 20:10   ` zzapper

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