
                                NewList 5.0a

What is Newlist?

       AmigaDOS  is  great.   It  not  only  allows  you to manipulate files
graphically  VIA  workbench, but it also allows you to manipulate files on a
command  line  basis.   Commodore  utilized  the  command  line interface by
offering  powerful commands to help the user do what he wants to do.  One of
the  handiest  is LIST.  It not only gives a directory listing of names, but
also offers filesizes, file protection, and file creation.

   But LIST isn't perfect.  It doesn't offer much sorting.  It doesn't offer
much  customization.   It doesn't allow name filters.  It doesn't offer much
flexibility or power.  TRUE, LIST is small, but sometimes POWER comes first.

What does that mean?

   NewList  offers  the  SPEED  of  list,  and the POWER of a database.  Now
directories  can  be sorted not only by name, but also by size or date.  Now
directories  can  be sorted through an alphabet filter so only certain files
will  be shown (like D through G).  A quick option has been added to utilize
the  screen space, so no more 2 column output by MR.  dir.  Are you tired of
the  date  format?  Want to customize your print format?  Now you can create
your  own!   Newlist  offers  complete  customization  of  output,  powerful
manipulation  and  sorting  of files, many nice and thought out options, and
much much more.

Ain't it like LS?

   Well  sorta.   LS  and  LS-jr  are very good LIST replacements.  They are
quick  and  offer  UNIX  compatibility.  Newlist is JAM PACKED with options.
The  best  of  ls,  the best of dr, the best of list, and bunches of special
features  are  all  put  in  one  package.   With NewList, the user is given
processing power.  You can sort a directory the way YOU want it.

   Newlist was designed to be quick and offer all the MEAT commands most CLI
users  need.   From  the  ground  level on up, newlist was optimized and new
features   were   designed   to  be  their  quickest.   Fast  flexible  file
manipulation,  nice  powerful  customization,  and all those extra 'goodies'
were melded into one.


Features of NewList:

   1)  It's PURE!  NewList is REALLY quick if it's resident.
   2)  Very fast algorithms.
   3)  Completely dynamic.
   4)  Tons of sorts and filters (including the needed BY DATE!)
   5)  Full UNIX WILDCARDs (n*l*s? = newlist) and character filtering.
   6)  ANSI.
   7)  a slick multi-columnar quick option to utilize screen space.
   8)  ENV: support!
   9)  A slick date construction kit with 8 premades.
  10)  Print construction kit with 2 premades (ls-jr and list)
  12)  Fast non-recursive recursive directories!  (a mouthful ain't it)
  13)  Multiple paths.
  14)  A hunt mode.
  15)  Tons and Tons and Tons O' Flags and Switches!


Usage:  NewList ?

NewList  5.0a  by  Phil Dietz  NCEMRSoft
NewList [FLAGS ie. -q -v] <paths and UNIX wildcards>

       o  Overlook ENV:NEWLIST          a  Don't use Today, Yesterday, etc.
       b  Display blocks                k  Display diskkeys
  d0...7  Eight date/time formats      df  "string" Custom date.  See docs
       r  Display list in reverse       n  Display comments
       s  Sort by name                 ss  Sort by file size
      sd  Sort by date                 sc  Sort by comment
       h  No header                     i  Ignore .info files
      gd  Show ONLY dirs               gf  Show ONLY files
      gb  Show BOTH dirs/files grouped  u  Show DEVICE: usage info
      fA  Files start with A           tZ  Files go to Z
       c  CASE sensative with -f -t     z  C= list style directories
       q  Quick option                 qs  Quick option with file sizes
       v  Vertical sort quick columns   p  Page prompt when screen is full
     y #  Use # columns for quick     l #  Show files made in last # days
     x #  Max # dir-levels to enter     T  No totals
       R  Enter sub-directories         W  Enter uses wildcard on ALL levels
       H  Hunt for files on disk        Q  No system requesters
       F  Custom format string " %p %U %d %b %k %s %v %c %C %N %n %P \nte "

NOTE:  each flag must have a - identifier.  ie  -q -sd -i -z -l 20 -F "%P"


FLAGS IN DEPTH:

   [-o]   When you want to OVERLOOK the ENV:NEWLIST variable.  Using
          [-o] (or any another overriding flag) yields the normal
          print-as-being-read format.  This print-as-being-read format
          can be helpful for checking what order some programs will
          process files ['GIFFY' displays GIFs in this order]

   [-a]   Forgets about the TODAY, YESTERDAY, bologna.

[-b] [-k] Instead of the default display of filesize, newlist will
          instead display BLOCKS or DISKKEYS respectively.

[-d0...7] Eight different pre-made date formats ranging from the
          fully expanded 1st grade letterhead (Friday, November 9, 1990,
          05:30:24 PM), to the default LIST format, to Euro-Styles to slashes,
          dots and dashes, to DateStamp values (Handy for programmers!).

  [-df]   Allows you to create your own Date format.  The format is
          -df "DATE STRING".  Here are the flags available:

            y => year minus 1900
            Y => full year value
            m => month value as integer
            M => month name
            d => day of month (1..31)
            D => day name ("Monday".."Sunday")
            h => hour in twenty-four hour notation
            H => hour in twelve hour notation
            i => 12 hour indicator for H notation (AM or PM)
            I => same as i
            n => minutes    (sorry...conflict with m = months)
            N => same as n
            s => seconds
            S => same as s
            t => prints TODAY, YESTERDAY, or Day of the week if applicable.
                 If the file doesn't fall in the last week, it will be
                 blank.
            T => Two must be present.  Mark off block which will be
                 substituted with today, yesterday, if applicable.
                 If not applicable, it will process the inner block.
                 (ie  -df "Date: %T%3M %2d%T" will sometimes print
                     Date: Today  or  Date: Mar 16)
            Z => Abbreviated Day Name [Mon, Tue, etc.]
\n, \t, \e, \'=> Newline, tab, escape key, or quote ".  \e can be used
                 to make neat ANSI sequences.  See aliases 'color'.

                       Make a C string like printf.
               -df "Date: %02d-%M-%02y at %02h:02n:02s"

                                yields
                      Date: 11-Jan-90 at 01:03:20

                       It's Easy.  It adds spice.

  [-r]    Displays a list in REVERSE from top to bottom.  WHY?
          Instead of waiting for the whole list to scroll by to see a
          file at the bottom, you can reverse the list and ctrl-c to
          stop quick!  It's also handy when sorting by date.  All of
          the newest files will be displayed first.

   [-s]   Sorts files alphabetically.  A synonym is [-sn].

  [-ss]   Sorts files by file size (or blocks or keys).

  [-sd]   Sorts files by date of creation.  Very handy!!

  [-sc]   Sorts files by comments.  If you use FileNotes wisely, you can
          have your directories be grouped by file type.  Simply
          add a filenote to each file and give it a type (Picture, GIF,
          Utility, NoiseTracker, etc.)  Now when you view by [-sc],
          the files will be grouped together by type!  You can also use
          the included alias 'dirtype' which will display the filetype
          in a nice position.

[-gd|-gf] Groups the display so ONLY dirs or ONLY files are shown
          respectively. Similar to 'dir dirs' or 'list dirs'

  [-gb]   Shows BOTH directories and files, all dirs then all files.
          Output is similar to DIR.

   [-u]   Shows bytes FREE and bytes USED on disk.  Now you can get
          all your needed info with one command instead of a "dir
          list info" combo.  Note: due to RAM:'s variable size,
          the bytes free will be zero.

   [-n]   Do you hate seeing those huge FILENOTES destroying your
          directory list?  This flag will toggle if you want to see them.
          If not present, a simple "Comment" or "c" will be shown to tell
          you "hey mister, you can read me if you wanna."

   [-h]   Doesn't display the header file.....ohhhhh.....big deal!
          Well it does seem off place in the -q quick directory, so
          it might help.  Another LIST option (holy cow!)

   [-c]   When using the letter filters [-f -t], this flag will also take
          into affect the CASE of the filter letter.  So now only upper or
          only lower case files can be displayed.

          NOTE: [-fA] or [-tZ] MUST be set to an alphabetic character
                to utilize case sensativity!  The default letters are
                SPACE and DEL, so [-c] will not work unless you change
                one of them!

  [-fA]   The MINIMUM letter for the filter.  Let's say you only want to
          view files greater than or equal to t.  Just set -ft.  Very
          handy for printing lists where you left off.
          Remember -f as  FROM A

  [-tZ]   The MAXIMUM letter for the filter.  Only files less than or equal
          to the letter will be shown.  To see files h through l
          Just set   -fh -tl.
          Remember -t as TO Z

   [-i]   Ignore *.info files!

 [-l #]   Show files made in the last # days.
          Now you can view files that were made in the last two weeks
          without viewing a whole directory. (ie nl -l 14)

 [-y #]   Force # columns for [-q] quick option.  Use this option when
          re-directing the output to a WIDE printer.  ie. to utilize a
          printer with 20 pitch type, use  nl >prt: -q -y 9 dh0:

   [-q]   Gives a QUICK and easy listing of the directory.  The entire
          screen will be utilized and multi-columns will be created.
          Names will be white, and directories will be another color.
          Because of its simplicity, not all of the flags are usuable.
          (like -df etc.)

  [-qs]   Quick option WITH file-sizes!  A very very handy option very
          similar to DIR opt s, but with multi-columns.  Note: if you'd
          rather see blocks or keys instead, add -b or -k  (nl -qs -b)

   [-F]   Allows designing of custom print format.  Now you can design the
          way YOU want the output to be.  Here are the flags supported:

               %b  -  block size
               %c  -  micro-comment 'c' if filenote available
               %C  -  'Comment' if filenote available
               %d  -  Date (this date can be constructed with -df!)
               %k  -  disk key
               %n  -  file name
               %N  -  filenote
               %p  -  show protection bits
               %P  -  file name with complete path
               %s  -  file size
               %v  -  variable output.  Depends if [-b] [-k] or [none]
                       are used.
               %U  -  UNIX protection bits.  Adds d for dirs and l for links
                       Routine distinguishes directory and file links,
                       but not SoftLinks since they can be either!
   \n, \t, \e, \'  -  Add newline, tab, escape charater, or quote ".  These
                      sequences may be used to create neat ANSI stuff.  Check
                       out an example in 'aliases'.

                      Here is a UNIX ls format example
             -F " %U %c %4b  %7s %d %n" -df "%M %2d %02h:%02n"

          Custom print formats also allow easy batch script making!
          This format will make a script file test.script that will
                   copy all *.c files in current dir to ram:

                   nl >test.script -F "copy %n to ram:" *.c

          This format will make a script file test.script that will
                copy ALL files made in the last 2 days to df1:

                   nl >test.script -l 2 -R -F "copy %P to df1:" *

                   So ya still like LS?  Take off, ya hoser.

   [-p]   Turns on pagnation.  When each the screen fills, a prompt
          will be put up so you can read all the files before they fly by!
          Press return to continue.  To break the list enter q or quit or
          quintessential-list-replacement.....anything with a q. :-)

   [-R]   Now non-recursively enters subdirectories.  What is non-recursive
          recursion?  Simple.  My stack is kept track by me and not by the
          system.  My stack doesn't waste the precious system stack,
          therefore it can handle the standard 4000 bytes.

          ie.   nl -R -l 1 dh0:    will show all files made since yesterday!

          [-R] should be used when you want to see ALL the contents of
          subdirectories.  It's similiar to OPT ALL on dir.  Note:
          wildcards affect only the root level with [-R] whereas
          wildcards affect EVERY level with hunt mode [-H].
                     ie    nl [-R|-H|-W] dh0:c*    will list

               use [-R]                           use [-H]
             candy/snickers                     candy/chocolate
              Cars/datsun                        cars/cadillac
              Cars/cadillac                    drinks/coffee
              Cars/yugo                        lemons/cray-computer

 (all files in dirs starting with c)(only files starting with c in all dirs)

   Note:  WB2.0 allows links.  Since I don't have WB2.0 to test them, I
          made newlist not enter linked directories.  As soon as I obtain
          WB2.0, I will add link traversals.

   [-W]   Will exclusively use wildcard to match files and sub-directories
          on EVERY level.  Default mode for [-R] is to use wildards only
          on the root level.  Now ONLY files matching wildcard will be shown
          and ONLY subdirectories matching wildcard will be entered.

                                 use [-W]
                              candy/chocolate
                               cars/cadillac

            (Only files starting with c in dirs starting with c)

          [-W] is the method that ls uses- enter only dirs matching pat

   [-H]   Hunt files down.  Will recursively enter subdirectories, but
          will enter all directories regardless of wildcards, etc.  Why?
          Now let's say you want a list of all 'c' files on your harddisk.

                           Simply  nl -H dh0:*.c

          Besides matching wildcards, [-H] will also accept the other
          conditional flags (like -f -i -l etc.)
          Now you can list all capitalized *.info files on your harddisk...

                         nl -H -fA -c dh0:*.info

          [-H] enters every directory it finds (up to -x #) levels and
          tries to match corresponding files.

 [-x #]   Tells to enter only # subdirectories.  Otherwise it will enter
          every sub-directory it will find.  Use with [-R and -H]

 <paths>  the directories to view.  You can view as many directories at once
          as you like.  Simple add it's path.  Wildcards are supported.
          (Yes, UNIX style and yes, complex.   ie.  *ew?is*  = newlist)
          Each new path may have a totally different wildcard
          [ie newlist ram:*.c df0:*.lzh c:d?r df1:]
          Paths will be entered from right to left.


    All of the flags and paths can be used in any order.
      newlist dh0:*.c -s -r df1:*.o =  newlist -r dh0:*.c df1:*.o -s

    All of the flags can be used together (-q has exceptions):
      You can view a directory through a case sensative character filter,
      of files made in the last 2 weeks, sorted by date in reverse order,
      showing block size , with a custom dateformat string, custom
      print string, hiding .info files, paging, using a UNIX wildcard,
      etc. etc.

Environment Variable support:

      ENV: variables are NOW supported.  Now long customized argument
   lists can be spared!  The variable ENV:NEWLIST contains any flags
   you want to have automagically set upon initializing newlist5a.  To
   utilize the ENV: support, use ED and create ENV:NEWLIST by
   typing in the flags you want to have default (ie. -r -sd). Easy.

      With ENV: comes a diminished return.  Now if you want the standard
   'list' type display (files out of order and displayed as they are read)
   , then the [-o] option must be used.

   NOTE: to override the ENV:NEWLIST, you can enter [-o] or you can type
         any different flag.  Suppose  ENV:NEWLIST is "-r -sd -d3",
         to sort by size:    nl -o -ss    or simply    nl -ss

Easier wat to Create ENV: variables:

      Make sure ENV: is assigned to a permanent directory.  Now use the
   Commodore supplied command setenv.  Here is ENV:newlist setting:

                     setenv  newlist  "-sd -u -i -gb -a"

Tired of ENV: not being read?

      Do you want to add just one more flag to ENV: (like -i or -p), but
    find out that ENV: is ignored all together?  The solution is to create
    aliases.  Aliases will guarentee that certain flags will be set no matter
    what "extras" you give it.  I have included some basic ones in the file,
    'Aliases'.  Append it to s:Shell-Startup.  Now when you want to add
    paging and list reversal to an ls-style dir, enter ls -p -r.


~~~~~~~~~~~~~~~~

Comments:  First off.  Rename newlist to nl (for newlist), stick it in
           your c: directory, and PURE it (protect c:nl +p).  People use
           names that are short and you know that you want to type nl
           instead of newlist.

           Now edit your Startup-Sequence to make nl RESIDENT upon bootup.
           (add  RESIDENT c:nl PURE or ARES c:nl, depending if you use
           Workbench or ARP)

           Enjoy.  Keep in mind: this is a very useful tool.  A tool that
                   costs only a few dollars.  It's a blue light special :-)

           Bare with me if Newlist doesn't like your set-up.  Please
           write me if you encounter any bugs or heinous crashes.

                           Phil Dietz -- NCEMRSoft
                           PO Box 306
                           Yutan, Nebraska 68073
                           USA
