Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Globbing question (beginner)
- X-seq: zsh-users 15278
- From: Bryan Hunt <irishjava@xxxxxxxxx>
- To: "zsh-users" <zsh-users@xxxxxxx>
- Subject: Globbing question (beginner)
- Date: Thu, 12 Aug 2010 21:43:59 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:subject:from:to :date:message-id:user-agent:content-transfer-encoding; bh=85WlyErh3FbRY5u+PjpgcWgQKBnMZ3Uk/Hdje0aN5a4=; b=QSv0zv/X3wx07SmJkDeXBADQVisQe+0/JKjj6ZrOJrYAprE/Q5iai2OgZrsQmAxfht ranIsdEFmYNTKTphLX0gSJ3kuoqfbSwdtmG8qumsqJB4akgvVMu/6q76fv7b5YRzmJrD WkFxMVerwmG+dm/1WL33H0swDliIvA8xD18lo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:subject:from:to:date:message-id:user-agent :content-transfer-encoding; b=gZxt2M1MAFXeWoNKWHzUEa/y3vsfeISbMCNNKVWB3zfOagBnZuOWD68GwxTlcrXzFe 2Q9dbr4hNqXSGWGnEer1bhoxRZxke7npELAtkijrR3MbjwWXvZ/sWehnDlUQtnVbfRtA mLAo2cQendmqnJDHaqa81Hpv/QKUlycWYCodA=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
On a recent twitter feed, was posted the following snippet - Intended
for printing the name of the most recently modified file in a tree:
print ./**/*(om[1])
I used this as a way of printing the 3 most recently modified files in
a single directory:
print ./*{(om[1]),(om[2]),(om[3])}
But something troubles me, it looks ugly - surely there must exist a more
elegant zshism ?
--
--
Messages sorted by:
Reverse Date,
Date,
Thread,
Author