Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zsh bug report -
- X-seq: zsh-workers 34833
- From: "pdysonuk@xxxxxxxxx" <pdysonuk@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: zsh bug report -
- Date: Thu, 2 Apr 2015 13:59:21 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:mime-version:subject:message-id:date:to; bh=hrshlEydzyiUAL/lWz4MuUiXparWg5Oz340XTGDgp2s=; b=pjEjQJxVZ24MaNASPjOUtnPqVLSdtzCHCN6TVhQegLMqteVMlyp8ZHlpzsvK+83L3O RKXfi2dPdnHUDo2xrgKPQydx8Mw5Cl5BpU46RTfBVA3+t2NjVdVL9nY+1TFNquNo22b6 c76ZaSbfzVqKxeXk5nss8tTBt/q70RaOZqkUkSva2EIh2c/v+R+EYXViYK+Ch8gKcQyP 2lhubedVkSxN390BJ1frJkJdT5YVbINGWOkQXZeU+Qx2yfb1mAhOU678jkzXRUCjefmy VeKlm+em+IGbb/hKDW1jh9dwb14JPT4Ad4E7APddV5eZpJWt3u2OCctu7FccqxhFk4KY Jj0g==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi
I think I may have found a bug. I posted <http://stackoverflow.com/questions/29073706/zsh-tail-function-not-displaying-correct-file> the problem on stack overflow as I thought it was my lack of understanding. Here is a copy of my post:
If I list the directory contents in most recent modified order and get the most recent file with:
print dir/*(om[1])
I get the most recently modified file. However, if I just want the file name by using the :t modifier like:
print dir/*(om[1]:t)
it returns the oldest modified file's file name. My understanding was that the modifier :t is the last action on the returned results and, therefore, it should return the file name of the most recently modified file. Does anyone know why I am getting this unexpected result and how to fix it?
Many Thanks
Paul
zsh <http://stackoverflow.com/questions/tagged/zsh>This behavior seems to be the case with all modifiers (a, e, l, etc.) not just t. The ordering seems to be consistent between different modifiers, but differs when there is a path component in the pattern: print *(om) produces a list ordered by date as expected as does print ./*(om). print *(om:t)*seems to be arbitrarily ordered, print ./*(om:t) seems to alphabetical. most curiously, with print */*(om:t) the returned list is ordered first by the modification date of the first matched glob and but then arbitrarily by the second glob. I suspect that this may be a bug in zsh. – Adaephon <http://stackoverflow.com/users/2992551/adaephon> Mar 17 at 6:52 <http://stackoverflow.com/questions/29073706/zsh-tail-function-not-displaying-correct-file#comment46417465_29073706>
Please could you let me know if this is actually a bug or is it my lack of understanding in using zsh?
Many Thanks
Paul
Messages sorted by:
Reverse Date,
Date,
Thread,
Author