zsh-workers
 help / color / mirror / code / Atom feed
From: "pdysonuk@gmail.com" <pdysonuk@gmail.com>
To: zsh-workers@zsh.org
Subject: zsh bug report -
Date: Thu, 2 Apr 2015 13:59:21 +0100	[thread overview]
Message-ID: <89570CE0-6F0E-423D-B42F-D1C289C5AB1D@gmail> (raw)

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

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


             reply	other threads:[~2015-04-02 12:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 12:59 pdysonuk [this message]
2015-04-02 16:36 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=89570CE0-6F0E-423D-B42F-D1C289C5AB1D@gmail \
    --to=pdysonuk@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).