home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / fish / 771-780 / ff773 / ls / ls.doc < prev    next >
Text File  |  1992-12-05  |  24KB  |  636 lines

  1.                                 LS 4.7ljr
  2.                             USER DOCUMENTATION
  3.                          Mon Oct 26 01:31:10 1992
  4.  
  5. IMPORTANT NOTE: LS 4.7ljr is compatible with Amiga OS Release 2.04
  6.         (and later) ONLY!
  7.  
  8. Use version 4.4ljr or before if you haven't upgraded to 2.04 yet.
  9. Due to library version differences and bugs, this software will not
  10. work with pre-release versions of 2.0 (basically anything below 2.04).
  11. LS 4.7ljr will report ``ls: Need AmigaOS Release 2.04'' if it doesn't
  12. think that you have the correct version of the OS installed.
  13.  
  14. The change to 2.04 ONLY was done for various reasons (ranked from
  15. most to least important):
  16. 1) More robust, powerful and consistent pattern matching.
  17. 2) More robust and consistent date handling.
  18. 3) 2.0 style (local) environment variables.
  19. 4) Author's desire to `convince' people to upgrade to 2.04.
  20. 5) Smaller binary size (due to use of ROM library routines).
  21.    Of course all the new features help offset this saving... :-)
  22.  
  23. -----------------------------------------------------------------------
  24.  
  25.      LS 4.7ljr - A versatile Amiga directory listing utility.
  26.  
  27. This software is Copyright © 1989, 1990, 1991, 1992  Loren J. Rittle.
  28. This software is Copyright for the sole purpose of protecting
  29. the fact that this is indeed free software.
  30.  
  31. This software is wholly based upon Justin V. McCormick's PD LS
  32. ``V3.1    July 29, 1989'' with enhancements and bug fixes by
  33. the copyright holder, Loren J. Rittle.
  34.  
  35. This program is free software; you can redistribute it and/or modify
  36. it under the terms of the GNU General Public License as published by
  37. the Free Software Foundation; either version 2 of the License, or
  38. (at your option) any later version.
  39.  
  40. This program is distributed in the hope that it will be useful,
  41. but WITHOUT ANY WARRANTY; without even the implied warranty of
  42. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  43. GNU General Public License for more details.
  44.  
  45. You should have received a copy of the GNU General Public License
  46. along with this program; if not, write to the Free Software
  47. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  48.  
  49. The word free above refers to freedom of software not cost of software.
  50. Learn about software patents.  Learn about interface copyrights.  Learn
  51. why you as a user should abhor software patents and interface copyrights
  52. in their current (and becoming) form.
  53.  
  54. I can be reached at the following address:
  55.  
  56. Loren J. Rittle
  57. 1008 Landing Rd.
  58. Naperville, IL  60540
  59. (708) 420-7942
  60.  
  61. EMail: rittle@comm.mot.com
  62.        and as 'Loren Rittle' on the MicroTech BBS (708) 851-3929
  63.  
  64. Original Notices by Justin:
  65. /*
  66.  *      This program is placed in the public domain with the
  67.  *    understanding that the author makes no claims or guarantees with
  68.  *    regard to its suitability for any given application, and that
  69.  *    the author assumes no responsibility for damages incurred by its
  70.  *    usage.  Any resemblance of this program to any other program,
  71.  *    either living or dead, is purely coincidental.
  72.  *
  73.  *      Feel free to borrow this code and make millions of dollars
  74.  *    from its sale or commercial use, but please give credit where
  75.  *    credit is due.
  76.  *
  77.  *      Please do not send me money or stolen software!  I enjoy mail,
  78.  *    phone calls, and legitimate software contributions of all kinds.
  79.  *
  80.  *                 Thanks for your encouragement and support,
  81.  *                          Justin V. McCormick
  82.  *
  83.  *    Justin V. McCormick can be reached via:
  84.  *
  85.  *      BIX: jmccormick
  86.  *    PLINK: JVM
  87.  *
  88.  *    PHONE: 303-290-8429
  89.  *
  90.  *    USMAIL: 8330 E. Quincy Ave.
  91.  *            Bldg. C, #312
  92.  *            Denver CO, 80237
  93.  */
  94.  
  95.  
  96. Synopsis:
  97. ---------
  98.  
  99.   Features intelligent columnar listing, versatile sort options,
  100. UNIX-style pattern matching, recursive subdirectory listing,
  101. customized output formatting and much more!
  102.  
  103. People who like the UNIX ls should feel right at home.
  104.  
  105. LS Version 4.5ljr, Sun Dec 29 22:23:52 1991
  106. Usage: ls [-h?acdeklnrst1ADFHIMNOPRTXY <args>] [path] ...
  107.     a  List all entries        A  Display entries across line
  108.     c  Show filenotes        D  Show dirs last
  109.     d  About dirs            F <format> Format output
  110.     e  Sort by extension        H  No headings and subtotals
  111.     k  No ANSI display codes    I <pattern> Ignore pattern
  112.     l  Long listing            M  Mixed output files and dirs
  113.     n  No sort            N <date> Show newer than date
  114.     r  Reverse sort            O <date> Show older than date
  115.     s  Sort by size            P  Show full pathnames
  116.     t  Sort by date            R  Recursive listing
  117.     1  Force one entry per line    T  Total all subtotals
  118.     Y <high> Set output rows    X <wide> Set output columns
  119.  
  120.  
  121. Installation:
  122. -------------
  123.  
  124. LS can be put in your C: directory where LIST and DIR are
  125. normally found.  LS can be made resident in your s:user-startup
  126. (2.0 and later) or s:startup-sequence (1.3 and before), but you
  127. may need to set the pure bit on LS after dearchiving to prevent
  128. spurious warnings:
  129.  
  130.     protect c:ls +p
  131.  
  132. Normal Shell users should add to s:user-startup (2.0 and later)
  133. or s:startup-sequence (1.3 and before):
  134.  
  135.     resident c:ls
  136.  
  137. WShell users would want to add to s:Config-WShell:
  138.  
  139.     resi c:ls
  140.  
  141.  
  142. The Command Line:
  143. -----------------
  144.  
  145.   All arguments are optional.  The default action is to give a
  146. short columnar listing, sorted alphabetically, using the current
  147. directory.  Alphabetizing is always case insensitive.
  148.  
  149. You can group your options together in any order, like this:
  150.  
  151.     ls -tlr df0:
  152.  
  153. Or you can have options specified independently:
  154.  
  155.     ls -t -l -r df0:
  156.  
  157. '-' and '--' signal the end of options on the command line to
  158. allow filenames that begin with a dash to be specified:
  159.  
  160.     ls -l -- -l        - long listing of a file called '-l'.
  161.  
  162. Also, a non-option argument signals the end of options on the
  163. command line:
  164.  
  165.     ls -l df0: -R      - long listing of df0: and then a
  166.              long listing of a file called '-R'.
  167.  
  168. However, if you specify several file or path names, the options
  169. will *not* (as opposed to version 3.1 by Justin) return to
  170. their default settings between paths.  For example:
  171.  
  172.     ls -l df0: df1:    - this will cause ls to print the long listing of 
  173.              df0: then the long listing of df1:
  174.  
  175.  
  176. Options:
  177. --------
  178.  
  179.   There are many command options for LS.  You can get a quick
  180. reference list of options by typing:
  181.  
  182.     LS -? or LS -h (this output is shown up in the Synopsis section)
  183.  
  184. Here is the complete list and description of the options:
  185.  
  186. a   List all entries [LS usually skips those files which have
  187.     their 'h' protection bit set or their file name's of the
  188.     form .#? (Like unix ls), #?.bak or #?.info (Because I hate to
  189.     see the damn things).  With the -a option, LS will reveal all
  190.     entries in a directory].
  191.  
  192.     "(#?.(info|bak)|.#?)" is the default hide pattern.  This
  193.     can be changed by setting the ls_hidepattern local environment
  194.     variable (see subsection entitled, ``Environment variables'').
  195.     For example, the following issued in a shell (or added to a
  196.     shell-startup command file): set ls_hidepattern ".#?",
  197.     would cause Amiga ls to function as a normal unix ls.
  198.  
  199. c   Show filenotes, implies long listing.
  200.  
  201.     The placement and way filenotes are displayed can be modified
  202.     by setting the ls_highlight0.on and ls_highlight0.off local
  203.     environment variables (see subsection entitled, ``Environment
  204.     variables'') and the format string (see subsection entitled,
  205.     ``Formatted Output'').  The default format string is
  206.     "%p %5b %8s %d %n%w%C\\n".  The %C sequence is the place the
  207.     filenote will appear in the output if requested with the '-c' option.
  208.     ls_highlight0.on defaults to "\n\x9b" "2m/* " and ls_highlight0.off
  209.     defaults to " */\x9b" "22m".  Thus all filenotes will appear on the
  210.     line after the normal long listing entry (that \n means linefeed
  211.     in case you don't know C style formatting).  E. g.
  212.  
  213.     R(0);T(00.266) > ls -c ram:a
  214.     -----rwed c     1        0 Sep 30 22:37 a
  215.     /* this file is neat */
  216.  
  217.     For example:
  218.     R(0);T(00.000) > set ls_highlight0.on " /** "
  219.     R(0);T(00.016) > set ls_highlight0.off " **/"
  220.     R(0);T(00.000) > ls -c ram:a
  221.         -----rwed c     1        0 Sep 30 22:37 a /* this file is neat */
  222.  
  223. d   Show information about directory entries only (i.e. doesn't
  224.     display the files in a directory).
  225.  
  226. e   Sort by extension.
  227.  
  228. k   Do not use ANSI escape codes in output (for colored text,
  229.     hiding cursor and obtaining the size of the window).
  230.  
  231. l   Give long listing.
  232.  
  233. n   Do not sort entries before displaying.
  234.  
  235. r   Reverse sort direction.
  236.  
  237. s   Sort entries by size.
  238.  
  239. t   Sort entries by date.
  240.  
  241. 1   Forces one entry per line of output. Useful when piping ls output to
  242.     other programs.
  243.  
  244. A   Force listing to flow across a line instead of down a column.
  245.     For example:
  246.     Without -A option you might see: 
  247.         apple  far    zip
  248.         blue   ghost
  249.         cars   jacks
  250.  
  251.     But with the -A option you would see:
  252.         apple  blue   cars
  253.         far    ghost  jacks
  254.         zip                              
  255.  
  256. D   Show directory entries last.
  257.  
  258. F   Format output (see below).
  259.  
  260.     Please see ALIASES/ for some example usages of this feature.
  261.  
  262. H   Do not print directory headings or subtotals.
  263.  
  264. I <pattern>   Ignore pattern.
  265.   Do not show entries that match the given pattern.
  266.   May be given multiple times on a command line (As per GNU ls).
  267.   Please see the section entitled ``Wildcards'' for more details
  268.   on the format of a pattern.  In short, uses the standard Amiga OS
  269.   Release 2.04 pattern matching style.
  270.  
  271. M   Mix directory and file entries together in final output list.
  272.  
  273. N <date>   Show entries that are newer than the given date.
  274. O <date>   Show entries that are older than the given date.
  275.   Currently a date must be formatted as follows:
  276.  
  277.     /* Standard "MMM DD HH:MM YYYY" 'ls' format */
  278.     "Dec 09 21:19 1991" or "Dec  9 21:19 1991"
  279.     (two spaces or a ' 0' MUST be present before a single
  280.      digit day of month.)
  281.  
  282.   OR
  283.  
  284.     /* Standard "DD-MMM-YY HH:MM:SS" AmigaDOS 'date' and internal format */
  285.     "08-Jan-92 18:35:38"
  286.  
  287.   I have ARexx scripts called todayls, weekls and monthls that
  288.   use these features.  Please see REXX/ for these macros.  As I
  289.   can't imagine anyone actually using these features in the raw, I
  290.   can't see a good reason to provide a more general/standard date
  291.   format...  Finally, you will note that the date format is quite
  292.   close to the standard 'ls' long listing date format (except the
  293.   user is always required to list both the year and the hour:minute,
  294.   instead of one or the other).
  295.  
  296. P   Print full pathnames for all entries, implies one entry per line.
  297.  
  298. R   Recursive listing, descend into subdirectories that matches pattern.
  299.  
  300. T   Print grand total of all entries.
  301.  
  302.   If LS cannot determine the current CLI window size, LS assumes the
  303. output is 77 columns by 23 rows.  The following two options let
  304. you control the output page width and length of the short
  305. columnar listing:
  306.  
  307. X <wide>
  308.   Set short listing page width to the given number of columns.
  309.  
  310. Y <high>
  311.   Set short listing page length to the given number of rows.
  312.  
  313. BTW, LS doesn't care what the number of rows in a window is
  314. anymore.  -Y is obsolete, but left in LS for compatibility
  315. with past releases.  LS needed the height of a window to support
  316. pagination (which was removed because it was a masive hack! :-).
  317.  
  318. Actual method to determine horizontal size:
  319.  
  320. The actual method for finding a horizontal size to use is as
  321. follows (in order checked):
  322.  
  323. 1. -X <wide> (or -1 option)
  324.  
  325. 2. size returned from the Windows Bounds Request.
  326.  
  327. [NOTE: Step two is skipped if the output is not to an interactive
  328. file or if the suppress ANSI escape codes option ('-k') is given.]
  329.  
  330. 3. 2.0 style (local) environment variables `console_width'.
  331.  
  332. 4. Hard-coded 77.
  333.  
  334.  
  335. Formatted Output:
  336. -----------------
  337.  
  338.   For customized output, there is a special option that expects
  339. a format rule as the next "option":
  340.  
  341. F <format>
  342.   Format output with <format>, with the following special symbols:
  343.  
  344.     %p   Print the protection bits
  345.     %d   Print the date, "MMM DD  YYYY" (if entry is over 180
  346.          days old) or "MMM DD HH:MM" (if a recent file).
  347.     %b   Print the number of filesystem blocks used by this entry.
  348.     %s   Print the number of bytes used by this entry.
  349.     %n   Print the name of the entry.
  350.     %S<arg1>   Print the `time to upload' for this entry.
  351.      <arg1> is the characters per second transmitted.
  352.      Default, if not listed, is 230 cps which appears
  353.      to be a good value for ZModem over a 2400 baud modem.
  354.     %h   Print the `hex file size' for this entry.
  355.     %C   Print filenote comment if present and requested with '-c'.
  356.          Filenote comment will have the highlight entry 0 applied to it
  357.          (see comments given in section describing '-c' option) before
  358.          printing.  In general, highlighting (ANSI color sequences, etc.)
  359.          should never be placed in the format string directly
  360.          as it will not be filtered out correctly when ls is given the
  361.          '-k' option or when ls is printing to a non-interactive device.
  362.          In %C's case, this is especially important and in fact nothing
  363.          related to filenote formatting should be included because not
  364.          all files have filenotes and in any event they are not always
  365.          printed.
  366.     %%   Print a percent symbol.
  367.     \n   Print a linefeed.
  368.     \t   Print a tab.
  369.     \"   Print a double quote (").
  370.     \\   Print a backslash symbol.
  371.  
  372. The default format rule that LS uses for long listings looks like this:
  373.  
  374.     -F "%p %5b %8s %d %n%w%C\n"
  375.  
  376.   Any of the format options that begin with the '%' symbol can
  377. have an optional pad count that lets you specify how many
  378. columns to use.  For example:
  379.  
  380.     -F "%40n\n"
  381.  
  382. would print each entry name right justified in a field of 40 columns.
  383.  
  384.   You can use this feature of LS to help create simple batch
  385. command files.  For example, look at this command:
  386.  
  387.     LS -PF "copy %n RAM:\n" df0:#?.h
  388.  
  389.   This tells LS to perform a listing using full pathnames with a
  390. special format, matching only filenames that end with ".h" in
  391. directory df0:.  Suppose df0:  has the following files in it:
  392.  
  393.     joe.h  fred.h  pete.h  ted.h
  394.  
  395. Our example LS command would result in the following list of commands:
  396.  
  397.     copy df0:fred.h RAM:
  398.     copy df0:joe.h RAM:
  399.     copy df0:pete.h RAM:
  400.     copy df0:ted.h RAM:
  401.  
  402. We could create a script file from this by redirecting the
  403. output of LS to a temporary file:
  404.  
  405.     LS >ram:templist -PF "copy %n RAM:\n" df0:#?.h
  406.     EXECUTE ram:templist    ;Do the script
  407.     DELETE ram:templist     ;Delete it
  408.  
  409. WShell 2.0 users could say the following to perform the same
  410. operation and avoid the use of a temporary file (and a bit of
  411. typing :-):
  412.  
  413.     ls -PF "copy %n RAM:\n" df0:#?.h | stdin
  414.  
  415.  
  416. User Customization of the Short Listing:
  417. ----------------------------------------
  418.  
  419.   Above, user customization of the long format is discussed.  Now we turn
  420. our attention to look at user customization of the short listing.  LS
  421. implements user definable highlighting to entry types in the short listing.
  422.  
  423. What does that mean in plain English?  In past versions of LS, the default
  424. was to color directory entries in the short listing, but keep plain file
  425. entries colored normally.  If the output was to a non-interactive file
  426. (e.g. a pipe or a file on disk) or the '-k' options was given on the
  427. command line, then the default changed to appending a '/' to directory
  428. entries in the short listing.
  429.  
  430. With the advent of Amiga OS Release 2.04, there are now many more types of
  431. entries that can appear on a filing system (a disk).  A number is
  432. associated with each entry type, e.g.:
  433. -4     is associated with a FILE LINK (hard link)
  434. -3     " " " PLAIN FILE
  435. -2 - 0 " " " NOT USED CURRENTLY
  436. 1      " " " ROOT
  437. 2      " " " USER DIR
  438. 3      " " " SYMBOLIC LINK (soft link)
  439. 4      " " " DIR LINK (hard link)
  440.  
  441. [Please note that C= currently recommends that users not use soft links.]
  442.  
  443. By default, LS 4.7ljr highlights entries as follows:
  444. FILE LINK: boldface
  445. PLAIN FILE: plain
  446. everything NOT USED CURRENTLY (as of OS 2.04) and out of range: plain
  447. ROOT: secondary color
  448. USER DIR: secondary color
  449. SYMBOLIC LINK: italics
  450. DIR LINK: boldface, secondary color
  451.  
  452. Users of LS can modify the highlighting to be applied to each and every
  453. file type by simply setting local environment variables.  Users can set as
  454. many or as few of the highlighting strings as they want, but must always
  455. set the 'on' string for LS to look for a new 'off' string.  These setting,
  456. as all local environment variables, are on a per shell basis.
  457.  
  458. The names of the environment variables to set is generated by concatenating
  459. the string sequences given below:
  460. "ls_highlight" <number_of_filetype_to_set_for> ".on"
  461. "ls_highlight" <number_of_filetype_to_set_for> ".off"
  462.  
  463. For example, ls_highlight3.on would be the prepend string related to
  464. directory entries.  Likewise, ls_highlight3.off is the name of the
  465. append string related to directory entries.
  466.  
  467. Entering
  468. set ls_highlight3.on ""
  469. set ls_highlight3.off "*e[2m/*e[22m"
  470. would tell LS to append a colored '/' after each directory entry in a short
  471. listing.
  472.  
  473. LS will keep track of the number of printable characters in the
  474. highlight strings and continues to format columns properly.  LS
  475. only supports embedded ANSI sequences that start with a CSI ('0x9b') or
  476. ESC ('0x1b') '[' and end with 'm'.  These ANSI sequences handle everything
  477. from text style to text color (foreground to background).  As a special
  478. exception, a filenote comment highlighting string (0), is set to
  479. "\n/* " (on) and " */" (off) if found to contain an ANSI sequence.
  480.  
  481. Sample ANSI sequences (as used from shell):
  482.  
  483. "*e1m" boldface
  484. "*e2m" faint (secondary color)
  485. "*e22m" normal color, not bold
  486. "*e3m" italic
  487. "*e23m" italic off
  488. "*e4m" underscore
  489. "*e24m" underscore off
  490. "*e7m" reversed
  491. "*e27m" reversed off
  492.  
  493. "*e3<digit 0-7>m" character color
  494. "*e39m" default character color
  495. "*e4<digit 0-7>m" background color
  496. "*e49m" default background color
  497.  
  498. "*e1;2m" boldface, faint (secondary color)
  499. "*e22m" normal color, not bold
  500. "*e1;34m" boldface, color 4
  501. "*e22;39m" normal color, not bold
  502.  
  503. For more information see: ``Amiga ROM Kernel Reference Manual: Devices''
  504. 3rd Edition pages 69-71.
  505.  
  506. If the output of LS is to a non-interactive file (e.g. a pipe or a file on
  507. disk) or the '-k' options was given on the command line, then the prepend
  508. ('on') and append ('off') strings are striped of ANSI sequences.  The
  509. search only checks the first character of each string to see if it is
  510. either a CSI ('0x9b') or ESC ('0x1b').  If an ANSI sequence is detected,
  511. then *both* highlighting strings are set to "".
  512.  
  513.  
  514. Environment variables:
  515. ----------------------
  516.  
  517.   Starting with LS 4.5ljr, LS uses the standard 2.0 style (local)
  518. environment variables and support routines.  See HIGHLIGHT_SETS/
  519. for some example usages.  The following is a list of all the
  520. environment variables LS deals with:
  521.  
  522. console_width (see subsection entitled, ``Actual method to determine
  523. horizontal size'')
  524.  
  525. ls_highlight-4.on, ls_highlight-4.off, ls_highlight-3.on, ls_highlight-3.off
  526. ls_highlight-2.on, ls_highlight-2.off, ls_highlight-1.on, ls_highlight-1.off
  527. ls_highlight0.on, ls_highlight0.off, ls_highlight1.on, ls_highlight1.off
  528. ls_highlight2.on, ls_highlight2.off, ls_highlight3.on, ls_highlight3.off
  529. ls_highlight4.on, ls_highlight4.off (see section entitled,
  530. ``User Customization of the Short Listing''), ls_hidepattern (see '-a'
  531. option subsection)
  532.  
  533. Note that LS doesn't require any environment variables to be set.
  534. The use of these environment variables is for advanced users to
  535. take advantage of advanced features in LS.  Also, note that for
  536. performance reasons, LS only refers to local environment variables.
  537.  
  538.  
  539. Wildcards:
  540. ----------
  541.  
  542.   Starting with LS 4.5ljr, LS uses the standard Amiga OS Release
  543. 2.04 pattern matching style and support routines.  If you want to
  544. continue to use a UNIX-style '*' in patterns, you should look into
  545. obtaining StarBurst or some similar utility that turns on the
  546. RNB_WILDSTAR bit in DOSBase->dl_Root->rn_Flags.  This is one area
  547. that the standard Amiga OS is so far ahead of the unix standard
  548. that I had to switch!
  549.  
  550.   Wildcards may be used in file names and in the last level of a
  551. directory path name.  The '#?' characters are used to match any
  552. number of characters, and a '?' matchs any single character.  If you
  553. need to specify a pathname with spaces in it like "Wombat Soup", you
  554. need to put quotes around it.  LS can process up to 100 separate
  555. pathname patterns in per command line.
  556.  
  557. Please refer to page 7-31 of the Amiga Release 2 Manuals or page 255
  558. of ``The AmigaDOS Manual 3rd Edition'' for more details.  The
  559. following chart may help someone who already knows what regular
  560. expressions are (actually, with the examples anyone should understand):
  561.  
  562. '?' - match a single character.
  563.       E.G. a?b matches 'axb', 'ayb', 'atb', etc.
  564.  
  565. '#' - matches the following expression 0 or more times.
  566.       E.G. a#?b matches 'ab', 'axxb', 'ayyb', 'azitb', etc.
  567.        a#b matches 'a', 'ab', 'abb', 'abbb', etc.
  568.  
  569. '*' - synonym for '#?' if WILDSTAR option is turned on.  NOT on by
  570.       default.  The WILDSTAR option is a system wide option, thus
  571.       there is no switch in ls to control it.
  572.       E.G. a*b matches 'axxb', 'ayyb', 'azitb', etc.
  573.  
  574. '(' - start a new expression.
  575. '|' - separate items enclosed in '(' and ')'.
  576. ')' - end an expression.
  577.       E.G. (cat|dog) matches 'cat' OR 'dog' only.
  578.        #(cat|dog) matches 'cat', 'catcat', 'catdog', 'dogdogdog', etc.
  579.  
  580. '~' - negate next expression.
  581.       E.G. ~(cat|dog) matches anything but 'cat' OR 'dog'.
  582.       E.G. ~c#? matches anything that doesn't start with a 'c'.
  583.  
  584. '%' - matches 0 characters. (only considered special if other
  585.       wildcards are present at same level, or in '(cat|%)' case).
  586.       E.G. hi(cat|%)(dog|%) matches 'hi', 'hicat', 'hidog', 'hicatdog' only.
  587.  
  588. '^' - listed in include file, but I don't know what it does...
  589.  
  590. '[' - start character class.
  591. '-' - range (only special in '[]')
  592. ']' - end character class.
  593.       E.G. [a-z]#? matches anything that starts with 'a' through 'z'.
  594.  
  595. '<any char not listed above>' - an expression.
  596.       As you have seen above, any plain character matches itself.
  597.       LS uses the `NoCase' style pattern matching routines, thus
  598.       an 'a' or 'A' will match an 'a' or 'A', etc.
  599.  
  600. Here are some simple examples:
  601.  
  602.     LS -a df0:#?.info       ; List all .info files in df0:
  603.     LS -a df0:#?/#?.info    ; List all dirs and .info files in df0:
  604.     LS -a df0:l#?/#?.info   ; List dirs that start with 'l' and .info files
  605.  
  606. [NOTE:  '-a' is needed because the current implementation of LS gives
  607. greater weight to patterns provided by '-I' and the builtin ignore
  608. patterns, namely #?.info, #?.bak and .#?, over explicitly mentioned
  609. patterns in all cases.  This problem is being looked into.  It seems that
  610. explicitly mentioned patterns should override particular ignore patterns in
  611. some cases.  E.g.  #?.info or source#?.info should override the builtin
  612. #?.info ignore pattern.  BUT, #? should not override the builtin #?.info
  613. pattern.
  614.  
  615. I currently believe the rule could be written as follows:  If ignore
  616. pattern A covers explicitly mentioned pattern B, then ignore pattern A
  617. should be discarded while dealing with explicitly mentioned pattern B.  The
  618. definition of cover is the same as when used in boolean algebra (function A
  619. is true whenever function B is true).
  620.  
  621. Because of the computation time involved, I don't think that this
  622. problem will be addressed anytime soon.  In fact, in general, proving that
  623. one pattern covers another may be NP complete or impossible.  Since 99.99%
  624. of the time (or more :-) we could care less about the files mentioned in
  625. the default ignored list it makes no sense to slow down the program to
  626. cover this odd case.  I just wanted the user to be informed of this
  627. behavior.  -ljr]
  628.  
  629.   Also, wildcards are helpful when you are trying to avoid showing
  630. certain files with the "-I <pattern>" option.  For instance:
  631.  
  632.     LS -I #?.o         ; List current dir, do not show .o files.
  633.     LS -I #?.o df0:    ; Same as above but lists df0: instead.
  634.     LS -I #?.o df0:c#? ; List entries that start with the letter "c"
  635.                        ; in df0:, but do not list .o files.
  636.