Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: help with _match, globcomplete etc. (with a PATCH)
- X-seq: zsh-workers 9760
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: help with _match, globcomplete etc. (with a PATCH)
- Date: Wed, 16 Feb 2000 10:57:55 +0000
- In-reply-to: <200002161011.LAA16009@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <200002161011.LAA16009@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Feb 16, 11:11am, Sven Wischnowsky wrote:
} Subject: Re: help with _match, globcomplete etc. (with a PATCH)
}
} Bart Schaefer wrote:
}
} > zsh% arr=('[sS]' Src/M ../)
} > zsh% print -l ${~^arr}*
} >
} > (I note that on that example expand-word produces a list of files but
} > the _expand completer (with substitute and glob styles set to 1) only
} > beeps, with or without 9752 applied. Is that the right behavior?)
}
} No. Seems like the (e) flag makes the thing be quoted as in double
} quotes. I.e. with a='${~^arr}*', ${(e)a} gives `[sS] Src/M ../*', but
} a='${(@)~^arr}' gives what we would have expected. The patch below
} changes the calls to parsestr() to calls to parse_subst_string() to
} get that. Hm, should we call that only conditionally, e.g. if the
} ${(e)...} is not inquotes and has no (@) or something?
My first reaction would be to answer "yes," and a little fooling around
with 9757 applied seems to bear it out:
a='*'
print -l "${(e)a}"
Would you really expect to get one file name per line in that case?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author