Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zshexpn(1) doc suggestion



I just spent more time than I should have (or at least I think I
should have) tracking down the glob qualifier to get filename
expansion to operate with a different time unit for the modification
(m) qualifier. I would have given up were it not for the fact I was
*sure* zsh could do this.

Currently, it's buried in the inode change (c) qualifier in the
zshexpn(1) page:

          c[-|+]n
               files whose inode changed within last n days  (-),
               more  than  n days ago (+), or n days ago.  If any   <
               of the flags a, m, or c is directly followed by  a   <
               M,  w,  h, or m (e.g. mh+5) the check is performed   <
               with months (of 30 days), weeks, hours, or minutes   <
               instead of days, respectively.

I think this information should be more prominent, and propose the
following patch, which points out the existence of the optional unit
specifiers near the qualifier (sans the text beautification):

          a[Mwhm][-|+]n
               files accessed exactly n days ago.  Optional  unit
               specifier  flags M, w, h, or m (e.g. ah5) mean the
               check is  performed  with  months  (of  30  days),
               weeks,  hours, or minutes instead of days, respec-
               tively. Files accessed within the last n days  are
               selected  using a negative value for n (-n); files
               accessed more than n days ago are  selected  by  a
               positive  n value (+n). For instance, echo *(ah-5)
               would echo files accessed  within  the  last  five
               hours while echo *(ah+5) would echo files accessed
               more than five hours ago.

although it may be overly verbose now (but better too wordy than not
enough, in my opinion).

Anyway, please consider it, or something similar. It's just too hard
to find right now.

Thanks,
  -mb-


*** zshexpn.1.orig	Mon Aug 28 14:56:23 1995
--- zshexpn.1	Mon Aug 28 15:00:10 1995
***************
*** 548,568 ****
  \fBg\fIid\fR
  like \fBu\fIid\fR but with group ids or names
  .TP
! \fBa\fI[-|+]n\fR
! files accessed within last \fIn\fP days (-), more than \fIn\fP days
! ago (+), or \fIn\fP days ago\fP
  .TP
! \fBm\fI[-|+]n\fR
! files modified within last \fIn\fP days (-), more than \fIn\fP days
! ago (+), or \fIn\fP days ago\fP
  .TP
! \fBc\fI[-|+]n\fR
! files whose inode changed within last \fIn\fP days (-), more than
! \fIn\fP days ago (+), or \fIn\fP days ago.
! If any of the flags \fBa\fP, \fBm\fP, or \fBc\fP is directly followed by a
! \fBM\fP, \fBw\fP, \fBh\fP, or \fBm\fP (e.g. \fBmh+5\fP) the check is
! performed with months (of 30 days), weeks, hours, or minutes instead
! of days, respectively.
  .TP
  \fBL\fI[+|-]n\fR
  files less than n bytes (-), more than n bytes (+), or
--- 548,569 ----
  \fBg\fIid\fR
  like \fBu\fIid\fR but with group ids or names
  .TP
! \fBa[Mwhm]\fI[-|+]n\fR
! files accessed exactly \fIn\fP days ago. Optional unit specifier flags
! \fBM\fP, \fBw\fP, \fBh\fP, or \fBm\fP (e.g. \fBah5\fP) mean the check
! is performed with months (of 30 days), weeks, hours, or minutes
! instead of days, respectively. Files accessed within the last \fIn\fP
! days are selected using a negative value for \fIn\fP (\fI-n\fP); files
! accessed more than \fIn\fP days ago are selected by a positive \fIn\fP
! value (\fI+n\fP). For instance, \fBecho *(ah-5)\fP would echo files
! accessed within the last five hours while \fBecho *(ah+5)\fP would echo files
! accessed more than five hours ago.
  .TP
! \fBm[Mwhm]\fI[-|+]n\fR
! like the access qualifier, except use file modification time as the criterion.
  .TP
! \fBc[Mwhm]\fI[-|+]n\fR
! like the access qualifier, except use file inode change time as the criterion.
  .TP
  \fBL\fI[+|-]n\fR
  files less than n bytes (-), more than n bytes (+), or



Messages sorted by: Reverse Date, Date, Thread, Author