home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 52
/
af052sub.adf
/
newlist.lha
/
NewList
/
Docs
/
Newlist.doc
< prev
next >
Wrap
Text File
|
1993-07-16
|
62KB
|
1,594 lines
$VER: Newlist8 (19-Jun-93) Main doc
NewList 8.0
(too good to be GNUlist!)
by
Phil Dietz
PO Box 306
Yutan, Nebraska
68073
19-Jun-93
===========
Disclaimer:
===========
Newlist is freely distributable. However I really really would
like a letter or a few dollars from ya. The more nice letters I get
from you, the nicer my résumé will be to give me the advantage in
the computer job market!!
**** EVERYONE SEND A NICE LETTER! THE MORE THE BETTER! ****
ps. All docs stay in the archive and PD companies must mail me a letter
before *selling* newlist.
==============
Register info:
==============
It's completely optional (but tell that to your karma :-)
If you register you will get:
- infinite updates of newlist for FREE
- updates mailed to you (even to foreign lands!)
- a FREE disk with each newlist update filled with other
new exciting PD programs I like!!
- a neat and official 'I support shareware' certificate
to show off to your friends saying you care for Amiga Shareware
- my patron only program 'NewLS' for the die-hard ls users.
- discounts on any commercial ventures I may take (soon!)
Registration fee: FLEXIBLE.
The registration fee is whatever you want! If you can't convert to
dollars, then just send foreign currency. If you can't send 20 bucks
then send 1 buck. If you can't send money, send a gift for my new
apartment (a lamp, a book, an a4000 etc.:-)
If you like newlist a lot then support newlist.
================
What is Newlist?
================
Newlist is not only a super fast, super powerful, and super
configurable 'ls', but it has innovative features that make it
the one true 'ls' for the Amiga. Features such as networking, datatypes,
mufs, styles, and internal string editing just aren't found in every
program. Newlist has power features, power customization, power speed,
and power flexibility.
The best of ls, the best of ddir, the best of list, and bunches
of my own special features were all put into one small and efficient
package. With NewList, the user is given processing power.
You can sort a directory the way YOU want it.
=======================
Is it too much for you?
=======================
Newlist may seem like too much for those who use the shell only when
they have too (cli-O-phobes)....but trust me, I wouldn't of made newlist
if I didn't see a need for it. Just take it nice and slow. I guarantee
after a day or 2 of using newlist and it's flags, you will start to
realize what you can do with newlist, and you will appreciate all of the
features I have put in.
====================
Features of NewList:
====================
o WB3.0 features including networking, numeric localization,
and datatypes.
o WB2.0 features including assign adds and links.
o Envoy and MultiUserFileSystem (muFS) support.
o User definable styles for both filenames and datatypes similar
to color-ls.
o 3 slick multi-columnar quick options to utilize screen space.
o 3 different type of recursion including a hunt mode like whereis.
o localization for foreign users (doesnt require WB2.1+!)
(10 languages are included in the newlist package.)
o internal string editing for the picky.
o a built in StarBurst utility for * wildcards.
o very fast algorithms and 'tight' code.
o full UNIX and AmigaDOS wildcards (n*l*s#? = newlist)
o ENV: support with permanent and conditional variables.
o header, date, multi-column, and print formatting, so you can have
newlist run like lsjr, dr, or your OWN way!
o flexible argument passing with multiple path support.
o fetches console window bounds and adjusts accordingly.
o a pager.
o ANSI color
o tons of sorts and filters (name, date, size, as-read, even comments!)
o tons and tons and tons of flags and switches!
o it's pure and residentiable!
o SAS6.3 compiled!
Usage: NewList ? or Newlist -?
NewList 8 WB2.0+ only BYq Phil Dietz NCEMRSoft
NewList [FLAGS ie. -rqt -p] <paths and wildcards>
o Overlook ENV:NEWLIST* variables e Append ENV:NEWLIST to flags
p Use Pager Z No ANSI
b k Show blocks or disk keys a No 'Today' substitution
u Show DEVICE: usage info h No header
n Show comments t No totals
gd gf gl Show ONLY dirs, files, or links Q No system requesters
gm Mixed output dirs & files i Show *.info files
s ss Sort by name or filesize X pat Exclude pattern
sc sr Sort by comment or as-read d0..8 Eight date/time formats
sd sn Sort by date or no sort S Stat totals only
r Reverse the sort z C= list style directories
R Enter subs w/wild one level A Include assign add's
W Enter subs w/wild ALL levels / Add / to dirs and > to links
H Hunt for files on disk q qs qt Quick short directories
J Do not enter links v Horizontal sort quick style
x# Max # dir-levels to enter y# Quick option uses # columns
c pat Comment wildcard = Separator line
P Use FULL path for names K Kill language buffer
] [ Show/hide 'a' bit B Relative path names
T# Turbo screen output 0..N f0..9 Ten formats
I Toggle Expert mode G Force Grand totals
Y pat Datatype wildcard ! Force ANSI on
U Use Styles for filenames V Use Styles for Datatypes
l Toggle long and short output L Use Envoy/muFS in WB2.xx
N O dd-mmm-yy or # Files made before/after date or # days ago
C Custom header format " %@Rs and all date formats "
D Custom date format " %@ABCmdyvMDYhHNSItT \Cnte' \f#b#s#o"
E M F Custom print format "%@pUdbksvcCNnPogDBTGImMeEfFhH \Cnte' \f#b#s#o"
===============
FLAGS IN DEPTH:
===============
Note: All these flags are compatible with Newlist8 WB3.0 version.
Usage on WB2.0 and WB2.1 will be missing some features.
========================
Miscellaneous Commands
========================
[-?] Usage Help.
[-o] When you want to OVERLOOK the ENV:NEWLIST, ENV:NEWLIST_QUICK,
ENV:NEWLIST_LONG, and ENV:NEWLIST_BOTH variables. Using [-o]
will ignore your ENV: settings and use the newlist defaults.
[-e] Appends the conditional variable ENV:NEWLIST to your current
flags. Normally when you give a flag, your ENV:NEWLIST is
skipped. Giving [-e] will tell it not to skip your environment
settings.
nl -p skips ENV:NEWLIST
nl -pe uses ENV:NEWLIST
[-p] Turns on pagination. When each screen fills, a prompt
will be be put up so you can read all the files before they fly
by! The prompt contains the current grand totals as well as
some neat inverse video effects.
[Space] - next full page
[Return] - next line
[n] - non-stop (turns off paging)
[Esc] or [q] - quit newlist
If you re-direct the output of newlist, paging will be turned off.
[-a] Forgets about the TODAY, YESTERDAY, bologna.
[-b] [-k] Instead of the default display of filesize, newlist will
instead display BLOCKS or DISKKEYS respectively.
[-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. Also note: sometimes the
size is off....I don't know why, but be aware.
[-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] Turns off the header.....ohhhhh.....big deal!
If you are auto-executing [-E] a format, [-h] will turn off
the verbose output.
[-t] Don't show totals.
[-Z] Forces ANSI sequences off. Piping data in shells is different
than redirecting so nl can't tell when to turn off ANSI
automatically. Thus you must give [-Z] whenever you pipe.
(Or use handy alias 'piper')
[-Q] Turns off system requesters. No more bothersome 'Please
insert disk' requesters. Since requesters are off, unmounted
things like soft links will not be traversed.
Note: system-requesters are turned on when fetching assign-add
directories.
[-/] Append a slash '/' to directories and a '>' to links.
Output is similar to NeXT Unix, A/UX, and dr.
The link sign '>' will only be printed in [-q] mode.
Oh yeah, I think ls's '@' is an ugly motha so I switched to the '>'
[-=] Prints a separator line between the dirs and the files.
[-S] Stats only option. Only prints totals for each directory.
All newlist filters (*.c -O1 etc.) will still affect the results.
[-A] Include Assign Add's. WB2.0 allows multiple assigns to a name
(ie many font dirs point to fonts:) This option will have newlist
fetch all the different assign paths and view them. Wild
cards, recursion, and multiple ASSIGN: paths will still work 100%.
[-d0...8] Eight different pre-made date formats.
-d0 - Expert mode date format
-d1 - Locale.library format
-d2 - YY.MM.DD HH:MM:SS
-d3 - MM/DD/YY HH:MM:SS
-d4 - YY.MM.DD
-d5 - MM/DD/YY
-d6 - Day Mon YY
-d7 - Day Mon [YYY or HH:MM]
-d8 - Date Stamp Values
These formats can be changed by editing your NEWLIST_LANG file.
[-f0..9] Ten different pre-made print formats.
These formats can be changed by editing your NEWLIST_LANG file.
[-P] Expands filename to include full path. This allows a no-hassle
way to see full path names without having to create a custom
format with a %P character. [-P] does not expand quick listings.
[-B] Will use relative path name instead of absolute. So you will
see FONTS: instead of dh0:fonts for example. Added because
a BBS owner wanted to hide his absolute path names from his users.
[-K] Frees all memory Newlist8 previously allocated (about 5k).
Newlist will have to re-parse ENV:NEWLIST_LANG when run again.
If you make changes to ENV:NEWLIST_LANG and you want to see the
results, you have to kill the file in memory first.
Use [-K] when you need the 5k newlist8 reserves or
use [-K] when you want to try or edit a new locale file.
[-I] Toggles Expert mode between novice<->expert. Having Expert mode
will result in a more compact output similar to 'ls.' Headers
are conditional. Grand totals, dev: usage, misc \n's, and
the separator line are off. The output also uses print and
date formats similar to lsjr. You can edit these formats by
editing the NEWLIST_LANG file. [-I] was implemented for those
users who thought the old newlist showed too much and for those
wanting output like 'ls'.
[-G] Forces grand totals on. Some people like to have directory
totals off [-t] but still want to see a grand total output.
[-!] Forces ANSI on even when doing redirection to printers, etc.
[-T #] When printing to shells, this option will speed up output upto
15-40%!! Giving a # will determine how much prescroll takes place.
0 = turbo off
1 = window height scroll (page at time)
2..N = scrolls number of lines at time
Try values 2, 3, or 4 for optimal performance.
[-L] WB2.xx does not offer networking extensions like WB3.0, however
Envoy and muFS both work in WB2.0 anyway. Using [-L] will
tell newlist to look for muFS or Envoy on any disk that you
use. Because WB2.0 doesnt have the networking stuff, older
filesystems that play with fib_Reserved or do not properly clear
them are thought to be networked as well, when actually they
aren't. WB3.0 has no problems at all...
===============================
Groupings, Sorts, and Filters
===============================
Various filters and sorts to suit most everone. Mix and match.
-gd -gf Groups the display so ONLY dirs, ONLY files, or ONLY links are
-gl shown respectively. Similar to 'dir dirs' or 'dir files'
To show only dir links or only file links, use -glgf or -glgd
respectively.
[-gm] Shows BOTH directories and files in mixed order.
[-gb] Separates dirs and files...it's now the default value of newlist,
but this flag is left in for backwards compatibility.
[-s] Sorts files alphabetically.
[-ss] Sorts files by file size (or blocks [-b]).
[-sd] Sorts files by time (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.
[-sr] Sorts files as-read (actually as hashed), but fully buffered.
To sort by diskkey use [-sr -k].
[-sn] No sort. This is the default for Commodore's list.
This method uses the least memory and is the fastest.
This format prints files as-read.
[-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.
[-i] Show *.info files!
[-X pat] Exclude a wildcard pattern. This will NOT show files that match
the pattern. ie nl -X *.info will hide all *.info files.
You may chain as many as you like, but each pattern needs a [-X]
flag. ie nl -X *.c -X *.o -X *.lnk
or nl -X *.(c|o|lnk)
[-c pat] Comment wildcard! A very interesting idea from Tim Boland.
He mentioned that he has his comments on his files telling where
he got the file (Fred Fish Disk 597 or A-LINK BBS etc.) With
[-c pat] command, you can say for instance
nl -c "*Fish 597" to get all files on FF 597
nl -c "*Fish 59*" to get all files in FF 590 series
nl -c "[amicus|*Fish]*" to get all Amicus or FF files
[-c pat] can also be used for a SHOW-ONLY commented files group
filter. To show only files with a comment do a nl -c ?#?
or a nl -c ?*
[-Y pat] Datatype wildcard. This pattern will be matched against all the
entries of the datatype (datatype, groupname, basename, typename
and id)
nl -Y picture shows all pictures
nl -Y "8svx" shows all 8svx sounds
nl -Y [pic|8s]* shows all pictures and 8svx sounds
To show a file's datatypes, see -F '%D %B %T %G %I' or use the
handy alias 'dinfo' in the file 'scripts/aliases'.
[-N] dd-MMM-yy or # days
Shows files made in the last # days or files newer than dd-MMM-yy.
Suppose today is Sun 10-Nov-91 and you want to see files made
yesterday. You can enter these:
nl -N 1 nl -N 09-Nov-91 nl -N Saturday nl -N yesterday
Note how you can enter the # of days, the date, the day name
(Friday, Saturday, etc.), or today, yesterday, etc., to represent
the same thing!
Day names like Saturday represent 'last Saturday' not
'this coming Saturday.'
[-O] dd-MMM-yy or # days
Shows files made before # days ago or files older than dd-MMM-yy.
See above [-N] for examples of usage.
-] Show files with the 'a' archived bit set. The following
produces a list of ALL files on dh0: that have been archived.
nl -]iH dh0:
-[ Show files without the 'a' archived bit set. The following
produces a list of ALL files on dh0: that NEED to be archived.
nl -[iH dh0:
Also see script 'BackUp'
[-l] Toggles between long and short outputs similar to UNIX ls.
=============================
Short Multi-Column Displays
=============================
Short displays. Lots of different variations for the choosing.
A sort will be used (name by default) none is given.
[-q] Gives a QUICK and easy listing of the directory. The entire
screen will be utilized and multi-columns will be created.
The colors of the names and directories can be changed by
editing the _STYLEMISC: class in NEWLIST_LANG.
Because of [-q] simplicity, not all of the flags are usuable.
(like -D etc.) Vertical sort is the default.
[-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 (ie nl -qs -b)
[-qt] Quick Option WITH file-sizes! Similar to ddir output with
filenames followed by their size. Long file names will be
TRUNCATED (up to 13 chars) to fit inside it's column. Column
width is variable depending on filename lengths and widowsize.
Make the window smaller, then the columns become smaller....
if they become to small (too much truncation) it will use
fewer columns. Blocks [-b] and keys [-k] also work.
[-v] Horizontal sort the [-q -qs -qt] outputs. Without
[-v], vertical sort is default. Issuing [-v] implicitly
means [-q -v].
[-y #] Force # columns for [-q] quick option. Use this option when
re-directing the output to a WIDE printer. ie. to use 9
columns for a printer with 20 pitch type, use nl >prt: -qy9 dh0:
[-M] Custom Multi-Columnar ouput. See Below.
===================
Custom Formatting
===================
Newlist's power comes from it's custom formatting. While other 'ls'
programs have formating, they LOSE THEIR SPEED. Newlist doesn't.
For help creating custom formats, consult
'docs/FormatTutorial.doc' for a tutorial on printf() style args
'scripts/Aliases' for examples
IMPORTANT: to localize a numeric string in a custom format, replace the
'%' symbol with a '@' symbol.
ie nl -F "Name: %n size: %v %s"
becomes nl -F "Name: %n size: @v @s"
Localization of numbers requires WB3.0. In WB2 '@' (ie @v)
is ignored and replaced with '%' (ie %v).
-----
DATE:
-----
[-D] Custom Date Format. Use if your country has different format.
The format is -D "DATE STRING". Here are the flags available:
%A - locale.library foreign date from DateToStr
%B - locale.library foreign time from DateToStr
%C - locale.library foreign day from DateToStr
NOTE1: %A, %B, and %C are quicker than newlist equivalents. If
you do not own WB2.1, then the results will be in English.
NOTE2: %A, %B, %C use locale.library...if it is configured for
a different language (say german) and you are using
a different language file (say finnish), you will get
a mixture. To get all finnish, replace %A, %B, and %C
with other newlist date format equivalents.
%y - year as 2 digits (90)
%Y - year as 4 digits (1991)
%v - year if older than 1 year...or else the time.
^Note: no truncation (.#) allowed for %v..use %5v and not %5.5v
%m - month as 2 digits (07)
%M - month name ("January".."December")
%.3M - abbreviated month ("Jan".."Dec")
%d - day of month (1-31)
%D - day name ("Monday".."Sunday")
%.3D - abbreviated day ("Mon".."Sun")
%h - hour in twenty-four hour notation
%H - hour in twelve hour notation
%I - 12 hour indicator for H notation (AM or PM)
%N - minutes
%S - seconds
%t - prints TODAY, YESTERDAY, or Day name if applicable
%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 -D "Date: %T%3M %2d%T" will sometimes print
Date: Today or Date: Mar 16)
\n, \t, \e, \' - Newline, tab, escape key, or quote ". \e can be used
to make neat ANSI sequences. See aliases 'color'.
\b# - sets background color (0-9)
\f# - sets foreground color (0-9)
\s# - sets style (0-9)
\o - resets ansi for normal output
\C - Adds color string defined in language file under _NAMECOLOR:
Make a C string like printf().
-D "Date: %-9.9T%02d-%3.3M-%02y%T at %02H:02N:02S"
yields
Date: 09-Nov-91 at 01:03:20
or Date: Today at 01:03:20
It's Easy. It adds spice.
-------
Header:
-------
[-C] Custom header format if you do not like the default.
Here are the meta-characters:
All date meta-characters above for [-D] (ie. %N, %M, etc.)
%s - Displays Path Name
%R - Adds Assign Add path name followed by an arrow....
ie fonts: ->
So normally you would put %R%s so you get results like
fonts: -> dh0:fonts
An ie: nl -C "\n%R%s on %02d-%3.3M-%02y\n"
w/color: nl -C "\n\f3%R%s\o on \f3%02d-%3.3M-%02y\o\n"
See 'aliases' file for neat examples.
-------------
Short Format:
-------------
[-M] Custom Multi-columnar output. Similar to [-q] short format,
but all of the flags in -F and -D can be used!
[-M] will not put a '\n' newline out until either:
1) you have a forced column setting
ie nl -y3 -M "%n" forces 3 columns
2) it will print off the window.
You WILL need to use expanding.truncating to get the output
in nice columns. For example: nl -M "%-20.20n %U "
Vertical and horizontal sort will not work on this data.
------------
Long Format:
------------
[-F] Custom print format. Now you can design the output the
way YOU want the output to be. Here are the flags supported:
%b - Block size
%c - 'c' if filenote available
%C - 'Comment' if filenote available
%d - Date (this date can be constructed with -D!)
%k - Disk key
%n - File name
%.5n - file name truncated to 5 chars
%N - Filenote
%P - File name with complete path
%s - File size
%v - Variable output. Depends if [-b] [-k] or [none] are used.
%p - C= style protection bits
Networking bits are also shown if applicable.
%U - UNIX protection bits. Adds d for dirs and H/S for links
Routine distinguishes directory and file links.
Networking bits are also shown if applicable.
%L - Prints expanded link names in the form
" -> Full-path-of-file". Soft Links that have
their link not mounted will be displayed as
" -> !myfile".
Bad links will be " -> :UNKNOWN FILE:"
Normally you would put %n%L so you get results like
filelink -> dh0:mylink
These flags require ENVOY:
%E - Users UserID
%e - Users Username
%F - Groups GroupID
%f - Groups GroupID name
%H - Users Primary GroupID
%h - Users Primary GroupID name
These flags require muFS:
%e - Users UserID (short name)
%E - Users Username (long name)
NOTE: MuFS will not be used if Envoy is installed.
These flags require WB3.0 and/or mufs/envoy:
%o - Networking/multi-user ID for Other
%g - Networking/multi-user ID for Group
%D - File datatype for Description
%B - File datatype for Base name
%G - File datatype for Group
%T - File datatype for Type
%I - File datatype for ID
\n, \t, \e, \' - Add newline, tab, escape charater, or quote ". These
sequences may be used to create neat ANSI stuff. Check
out 'color' in the file 'aliases'. \' is very useful
when filenames you are manipulating contain spaces.
It you put \' around the name ( \'%n\' ) most DOS
commands will now recognize the file.
\b# - sets background color (0-9)
\f# - sets foreground color (0-9)
\s# - sets style (0-9)
\o - resets ansi for normal output
\C - Adds color string defined in language file under _NAMECOLOR:
Here is a UNIX ls format example
-F " %U %c %4b %7s %d %n" -D "%.3M %2d %02h:%02n"
For a LOT of examples of formats look in 'scripts/Aliases'
So ya still like LS? Take off, ya hoser.
-------------
Auto Scripts:
-------------
[-E] Execute print format immediately. The format takes the form
of [-F] above.
This will prevent unnecessary script files from being generated.
For example:
nl sounds:* -E "sound %P"
will play all sounds in sounds:.
nl -H -N1 -E "copy %P to backupdisk:" dh0:
will copy all files made in the last day on dh0:
to your backupdisk:.
If you want to copy or move files, etc. with spaces in them
("Read Me"), you should pad the filename with quotes so
AmigaDOS will run it properly. (ie nl -E "copy \'%P\'" )
^ ^
Quote Characters
By default, -E prints in verbose mode (prints Executing xxx....)
To turn it off, turn off the header with [-h] flag.
WB2.0 version will allow interactive input and output with
CLI programs so you can "delete %P ASK" or whatever.
==========================
Recursion and Hunt modes
==========================
Recursion is where you enter subdirectories, print info, enter
it's subdirectories etc. It's similar to 'dir opt all'.
Newlist has 3 different types of recursion available. Mostly they
affect how the wildcard will be applied. Here's how they work:
ie nl [-R|-H|-W] dh0:c* will list
with 'nl -R dh0:c*'
candy/snickers (dir)
[loose wild] cars/datsun
cars/cadillac
cars/yugo
(ALL files in dirs ONLY starting with c)
with 'nl -H dh0:c*'
candy/chocolate (dir)
[hunt mode] cars/cadillac
drinks/coffee
lemons/cray-computer
(ONLY files and dirs starting with c in ALL dirs)
with 'nl -W dh0:c*'
[strict wild] candy/chocolate (dir)
cars/cadillac
(ONLY files starting with c in dirs ONLY starting with c)
[-R] uses the wildcard only on the first level. All files
and subdirectories after that will be displayed.
[-W] uses the wildcard on all levels. Only files and directories
matching the wildcard will be shown/entered.
[-H] enters every single directory no matter the wildcard,
and will only print info that matches the wildcard.
[-R] Recursion. This will use wild card ONLY for the first level.
nl -R FF:n* will show complete listings of dirs that
start with n.
FF:nebraska (dir) FF:names (dir) FF:numbers (dir)
Omaha Phil One
Lincoln Justin Two
etc. etc. etc.
[-W] Will exclusively use wildcard to match files and sub-directories
on EVERY level. ONLY files matching wildcard will be shown
and ONLY subdirectories matching wildcard will be entered.
[-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 -i -N etc.)
Now you can view all files made since yesterday....
nl -H -N yesterday dh0:
[-H] enters every directory it finds (up to -x #) levels and
tries to match corresponding files and dirs.
Hunt mode will now match both files and directories. If you
want to see only matching files, use [-gf] with it.
[-J] Jump links. Newlist will not enter or follow links when in
recursion mode. Works in conjunction with -R, -W, or -H.
[-x #] Only enter # subdirectory levels in recursion mode. Otherwise it
will enter every sub-directory it will find.
Use with [-R, -W, -H]. Root level only is [-x 0].
=================
Important Points:
=================
-------------------------------
Paths- the directories to view:
-------------------------------
+ You can have more than 1 path. Just add it. ie
nl df0: df1: df2:
+ Paths on the command line will be entered from left to right.
+ The Amiga currentdir character "" may not always work.
An alternative is to have a single wild card, *.
nl * rad: will list rad: then the current directory.
-----------------------------------------
Flags- how they work and are interpreted:
-----------------------------------------
+ All of the flags and paths can be used in ANY order.
nl dh0: -s df1: -r
is the same as nl dh0: df1: -s -r
+ Flags may be joined together: nl -rsgmi
separated: nl -r -s -gm -i
or both: nl -rs -gmi
IMPORTANT: watch out for amibiguous flag combinations.
ie. nl -qsd is not the same as nl -q -sd
The -qsd is parsed to be -qs and -d.
+ Flag parsing ignores whitespace. So if you say
nl -F"%n"
or nl -F[TAB][TAB]"%n" etc. they will be the same.
+ Most flags allow toggling back and forth.
nl -a is on
nl -aa is off
nl -aaa is on etc.
+ Precendence of flags goes as follows:
flags from
----------
Most Priority : Command Line
ENV:NEWLIST
ENV:NEWLIST_BOTH
Least ENV:NEWLIST_QUICK or ENV:NEWLIST_LONG
+ All of the flags can be used together (-q has exceptions):
You can view a directory 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.
-----------------------------
Wildcards- how they are used:
-----------------------------
+ Both Amiga and UNIX wildcards are supported
To use a wildcard simply add it right after the path
(ie dh0:*.c)
+ The wildcard MUST be connected to it's path. If you say
nl dh0:*.c (right)
nl dh0: *.c (wrong)
NewList will think you want a dir of dh0: AND a dir of
files matching *.c in the current directory.
+ Each new path may have a totally different wildcard
nl *.doc ram:*.c df0:*.lzh c:d?r df0:
^ ^ ^
just wildcard both just path
(assume current (assume * as
directory) wildcard)
+ "nl ?" brings up the help message.
To use '?' as a UNIX wildcard add a space ' ' or a flag
or a path before or after the '?'.
"nl ?" or "nl -?" get help
"nl ? " or "nl -s ?"
or "nl dh0:?" use '?' as wildcard
----------------------------
Supported wildcard patterns:
----------------------------
? Matches a single character
# Matches the following expresion 0 or more times
(ab|cd) Matches any one of the items separated by |
~ Negates the expressions
[abc] Character class: matches any of the characters
in the class
[~bc] Character class: matches any of the characters NOT
in the class
a-z Character range ie [a-l] (WB2.0 users need to CAPITALIZE the
letters ie [A-D]
% Matches 0 characers always (useful in "(foo|bar|%)")
* A synonym to #?
(ab*|*xy*|~*.c) A compound wildcard
========================
Support for WB2.0 Links:
========================
NewList has complete support for WB2.0's new link format.
NewList has the BEST link support available. This complete support
includes:
1) Hard links, soft links, and pipes are supported.
2) Links will be shown VIA the UNIX style protection bits.
ie dH----rwed and -H----rwed
^(dir link) ^(file link)
depending if they point to a directory or a file. Hard
and soft links will also be shown by the bits H and S
after the d
ie dH----rwed and -H----rwed
^(dir hard link) ^(file hard link)
dS----rwed and -S----rwed
^(dir soft link) ^(file soft link)
-P----rwed
^pipe
3) Link names can be fully expanded to tell where they point too
(even unmounted soft links!)
link -> dh0:source/newlist
4) Soft links will be distinguished as being dir links or file links.
Thus, softlinks will be transparently identical to hard links.
(softlinks do not tell if they point to a file or a dir. NewList
will find out for itsself.)
5) Intelligent link traversals. Circular directories and back-links
will not confuse newlist (unlike Commodore 'list'!)
A special method is used to prevent nonterminating loops.
A directory will ONLY be shown once. If a link wants to show
it again, it will be ignored.
6) Bad soft links or links that can't be resolved will be
detected and have the value:
link -> :UNKNOWN FILE:
7) [-/] flag will display links with a trailing >.
The color and style of the links depends on the user settings
in _STYLEMISC: class in ENV:NEWLIST_LANG.
8) Soft links that are not mounted will have a ! in front of
them. ie. link -> !df1:myfile
9) Recursive modes [-R -W -H] by default will traverse links.
If you wish for them not to be traversed, give [-J] jump option.
10) Better link utilities are given in the /Misc drawer.
A new 'makelink' utility that supports soft link generation
and a 'deletelink' utility to erase them are included. They
include full 'C' source.
==============
WB3.0 Support:
==============
Again newlist sets a precedence for supporting all of Commodore's newest
innovations. This time newlist is one of the few listers that recognize
the new Networking, muFS, Envoy, DataTypes, and Misc. facilities.
----------
Networking
----------
The networking/multi-user support is given by showing the Group and Owner
IDs for a given file as well as their new protection bits....
-Using '%U' protection bits:
dH rwedrwed sparwxd 123 456 07-Feb-93 2 UserNa 366 exec.h
--+---+-----+--- -+- -+-
+---+ | std. | +---+
Other Group OtherID GroupID
-Using '%p' protection bits:
exec.h 366 ---rwedrwedrwed 09-Mar-93 10:52 UserName
------+---+---+
std. | +--+
other group
^
This C= style of bits is given with '%p'
NOTE: The networking ID's and protection bits only show up
when you are doing a networked directory. This prevents unnecessary
data from being printed all the time.
----
muFS
----
Mufs does not require WB3.0. See networking above for info.
Newlist 8 also supports the Shareware filesystem called mufs which allows
for a multi-user filesystem similar to UNIX. When mufs is in use,
newlist8 will be able to show the owner name and id that owns a particular
file. If a user installs Envoy, then muFS will no longer be recognized.
To use muFS under WB2.0, you must give the flag [-L]. WB3.0 need not
use the flag...
muFS is able to show the files:
-UserID (short name)
-Username (long name)
-----
Envoy
-----
Envoy does not require WB3.0.
Basically the Envoy support is expansion of Owner and Group IDs...
see muFS and Networking above.
To use Envoy under WB2.0, you must use the flag [-L]. WB3.0 need not use
the flag...
Envoy support is able to show a files:
-Username
-UserID
-Groupname
-GroupID
-Primary Groupname
-Primary GroupID
---------
DataTypes
---------
This very powerful feature allows file types to be easily recognized.
Adding a new datatype to the system allows for all programs (like newlist)
to recognize it as well...
Normally you would see directories like this:
d----rwxd Oct 07 92 22:42 1 22222 spinach
However how you do not know what 'spinach' is. With newlist8 you can find
out! The directory will show:
d----rwxd Oct 07 92 22:42 1 Picture 22222 spinach
or d----rwxd Oct 07 92 22:42 1 ILBM 22222 spinach
or whichever fields you feel are most appropriate!
Surprisingly WB3.0 datatype recognition is fast as well taking only
a few extra milliseconds per file! However if you feel this
slow-down is too much, you can simply "not use the feature" and
not lose ANY performance from earlier versions. To "not use the feature"
simply remove any datatype flags from your custom formats (%DBTGI).
Datatypes that can be shown:
-Datatype
-Basename
-Type
-Group
-ID
Besides showing the types strings newlist also supports:
-Datatype wildcards [-Y pat]
-Datatype styles and color enhancement [-V]
-------------
Miscellaneous
-------------
Numeric data can be LOCALIZED as long as you own WB3.0.
An example of localized data is 1,234 instead of 1234.
To use this feature you must do some editing of the language file
(NEWLIST_LANG).
To localize the internal strings of newlist (in ENV:NEWLIST_LANG):
Simply replace the string %ld with %lD in the places where you feel
expanded numbers would suit best....like in the dev: size string, etc.
Example:
"Used %4lD bytes - Free %4lD bytes (%ld %% free)\n"
^ ^
was 'd' notice how the %free will not be localized
To localize your custom formats:
Simply replace the percent sign (%) of the meta-character
(ie %b, %s, etc.) with an ampersand sign (@).
Example:
nl -F "Name: %20.20n Size: %7s"
becomes nl -F "Name: %20.20n Size: @7s"
=============================
Environment Variable Support:
=============================
Environment variables allow a user to define his or her own default
settings for newlist. There are 4 different variables you may set.
They are NEWLIST, NEWLIST_QUICK, NEWLIST_LONG, and NEWLIST_BOTH. They
are not all the same. One is conditional and the other 3 are
semi-permanent.
NEWLIST_QUICK permanent variables
NEWLIST_LONG " "
NEWLIST_BOTH " "
NEWLIST conditional variable
Newlist will look for these variables in 3 places in this order:
ENV:
ENVARC:
and locale:
I HIGHLY recommend that you store ALL your variables in
ENVARC: since this is a permanent directory on a disk. So for all
references of ENV:NEWLIST, think of it as ENVARC:NEWLIST.
----------
Permanent:
----------
If you want a flag to always be set, use these variables. They are:
ENV:NEWLIST_QUICK
ENV:NEWLIST_LONG
and ENV:NEWLIST_BOTH.
These will load in all cases except when [-o] is given. These flags
are designed for permanent flags like custom date and print formats,
as well as other permanent type data. Depending on how you execute
newlist, certain variables will be loaded:
ENV:NEWLIST_QUICK will be read only for a quick [-q] format.
ENV:NEWLIST_LONG will be read only for a long format.
ENV:NEWLIST_BOTH will be read for either long or quick.
Be careful with the permanent settings. The settings are set
every time you run newlist. If you have a variable like short
output [-q] in your ENV:NEWLIST_BOTH and you want a long output,
*you will have to turn it off by hand* by toggling it back off
(nl -q) or by forgetting ENV: all together with a [-o].
-----------
Conditional
-----------
The conditional variable ENV:NEWLIST loads only in certain
circumstances. They are:
1) No flags are given (ie nl df0:)
or 2) The [-e] append ENV: flag is given. (ie nl -e)
If you give ANY flag (ie nl df0: -p) or if you give the [-o] flag
then ENV:NEWLIST will NOT be loaded.
One uses the conditional variable ENV:NEWLIST when one wants certain
flags to be used most of the time. This allows you to easily change
from one newlist output to another without many hassles.
For example...lets say your ENV:NEWLIST is a sort by date "-sd"
Giving 'nl -q' will skip ENV:NEWLIST and thus sort by name (default)
----------
Precedence
----------
Custom formats and non-toggle variables on your command line and
in your ENV:NEWLIST have precedence over those in ENV:NEWLIST_*.
Any custom format issued on the command line or in ENV:NEWLIST
will override your ENV:NEWLIST_* setting.
----> Flags and switches like [-p] do NOT have a precedence.
They will always be toggled. If ENV:NEWLIST_* has a [-p] for
paging on and ENV:NEWLIST has a [-p] for paging on, paging will
be toggled off.
Most Priority : Command Line
ENV:NEWLIST
ENV:NEWLIST_BOTH
Least ENV:NEWLIST_QUICK or ENV:NEWLIST_LONG
-------
Summary
-------
The majority of your flags should go in permanent variables
NEWLIST_LONG, NEWLIST_QUICK, or NEWLIST_BOTH.
The conditional variable NEWLIST is only for the flags you want
conditionally set.
Here's a short summary of what ENV: files will be loaded.
Lets say you have all of the ENV: variables defined...
nl df0: will load ENV:NEWLIST (since no flags on command line)
will load ENV:NEWLIST_LONG (if long output)
and will load ENV:NEWLIST_BOTH
nl -l df0: will load ENV:NEWLIST_LONG (since long out mode)
and will load ENV:NEWLIST_BOTH
nl -q df0: will load ENV:NEWLIST_QUICK (since short out mode)
and will load ENV:NEWLIST_BOTH
nl -q -a df0: will load ENV:NEWLIST (because of [-a])
will load ENV:NEWLIST_QUICK (since short out mode)
and will load ENV:NEWLIST_BOTH
nl -q -o df0: (no variables are loaded because of [-o])
-------------------------
Things you can do w/ ENV:
-------------------------
Examples: Commodore style to be the default
setenv NEWLIST_BOTH -z
for die-> Short output listing as default (like ls)
hard ls setenv NEWLIST_BOTH -q (or qs or qt)
users Special header for small style
setenv NEWLIST_QUICK "-C *"\b3Test String\o\n*""
===================================================
How to set ENV:NEWLIST and ENV:NEWLIST_* variables:
===================================================
Make sure ENV: is assigned to a permanent directory. Now use the
Commodore supplied command setenv. Here is my ENV:newlist setting:
setenv envarc:NEWLIST "-sd -u -Q"
or better setenv envarc:NEWLIST "-sduQ"
------------------------------------------------------------------
NOTE: the shell parses quotes (").
To set an ENV: variable with quotes from the shell, you must
escape them with:
setenv envarc:NEWLIST "-D *"Year %4Y*" -ss"
^^ ^^
escaped the quote
------------------------------------------------------------------
You may also edit the flags with a text editor like ed:
ed envarc:NEWLIST
copy envarc:NEWLIST env:
If you have no permanent envarc: replace all instances with env:
=============
Localization:
=============
Localiztion has been added to Newlist. It does _NOT_ require
WB2.1 or above, only WB2.04. Localization allows users to rewrite the
internal strings of newlist to run in their own native language.
So Newlist can now be German...Dutch...Polish...or whatever.
Ten languages are currently supported (however is Elite considered
a language?? :-)
As a benefit, you can change the ANSI colors and styles so the
output is to YOUR personal liking!
Use the supplied install script:
cd Languages
Execute Install_Lang
- or-
Simply copy your lang file as NEWLIST_LANG to ENV: or locale:
At anytime you wish to edit the language..simply edit ENVARC:NEWLIST_LANG
To edit language: Simply edit the ENVARC:NEWLIST_LANG
or locale:NEWLIST_LANG
---------
IMPORTANT
---------
Newlist parses the NEWLIST_LANG file *only 1 time*, after that
further calls will use the parsed strings already in memory!! This
drastically increases newlist's performance. If at any time you want
this 5k of memory back or if you want to change the NEWLIST_LANG file,
you can free this memory with the [-K] option.
To change lang file: execute Install_lang
-or-
nl8intl -K
cp newlist_lang.xxxx envarc:newlist_lang
Whallah...
I hope all of you enjoy localization!!!
Now newlist has COMPLETE customization.
NOTE: NEWLIST_LANG is not a WB2.1 catalog. I have no WB2.1 documentation!
==============================================
Language Editing and Internal String Changing:
==============================================
Newlist's greatest feature is that a user can configure newlist
to print the way he wants it too. One can edit the colors, the styles,
the date formats, the print formats, the totals...the whole enchilada.
He can make it run in Booga or he can make it run in duDeZ...just
make it.
When editing the strings you can add all the ansi sequences you want
including the macros that newlist has. The current macros are:
\n, \t, \e, \' - Add newline, tab, escape character, or quote ".
These sequences may be used to create neat ANSI stuff.
\b# - sets background color (0-9)
\f# - sets foreground color (0-9)
\s# - sets style (0-9)
\o - resets ansi for normal output
\C - Adds color string defined in language file under _NAMECOLOR:
This section will describe each language class, it's features, and
what you can do with them.
_NAMECOLOR:
This is the default color that newlist uses all over the place
(like in the Usage, the totals, etc.) This color is also used
whenever you use \C in a format. Currently it is "\f3" which is
color 3. To change it to say color 3 on a color 1 background
change it to "\f3\b1"
_STYLEMISC:
These strings allow you to change the style attributes of directories
and links for both long and quick formats. This allows you to say
set directories to be bold when doing a quick output, but say
have them be black on a blue background for long outputs. One can
set the styles for:
Directory color long output mode
Directory link color long output mode
File link color long output mode
Directory color short output mode
Directory link color short output mode
File link color short output mode
Mufs and Envoy User and Group names style
Remember: if you do not like a color than simply change it. If you
dont want any color then make the string empty like ""
_STYLEFILENAMES:
When a filename matches the filename patterns in this section,
a style will be printed. This allows a person to colorize their
directories. For instance a person could set
"*.lha" "\f3\b2"
which will print files ending in .lha in reverse colors. This
feature is similar to the feature found in the program color-ls
for linux.
_STYLEDATATYPES:
When a datatype for a file matches a datatype given in this section,
the filename will be printed in a special style. This allows you
to classify your directories. For instance you can have all pictures
be bold, all sounds be yellow, GIFs be orange, and text file be
reverse colors! To define this section simply put a datatype
followed by a style that should be printed. The datatype can be
ANY of the WB3.0 supported dataypes classes including basename,
groupname, ID, Type, or datatype.
"picture" "\s1"
"sound" "\f3"
_REG:
These are a bunch of miscellaneous strings that have NO ANSI strings.
Whenever you redirect newlists output or turn off ANSI
with [-Z], newlist will use these strings. The misc. strings are:
Long header format
Quick header format
Bad path format
IoErr() error string
Totals
Device: free space
Grand totals
Comment style/form
Pager format
Link separator
Expert mode (non-verbose) header format
_ANSI:
These are a bunch of miscellaneous strings like in _REG:, but they
have ANSI sequences/color in them. These are the default strings.
See above in _REG: for all the different string types.
_DATES:
These are 8 different date string formats which are selectable with
the newlist flag [-d 0..8]. Editing these strings will make switching
date formats real easy. The very first date string has a special
meaning in that it is the date format used in Expert mode
(-I Expert mode).
_FORMATS:
These are 10 different print formats which are selectable with the
newlist flag [-f 0..9]. Editing these strings will make switching
print formats real easy. It is especially useful now that datatypes
and networking bits are supported. The first format has a special
meaning in that it is the print format used in Expert mode
(-I Expert mode).
_USAGE:
Upto 30 strings describing all the flags of newlist. It comes up when
you do 'nl -?' or nl '?'. If your native language requires more
than 30 strings, then you can concat strings together and add newlines
in between them. Just make sure that the length of the entire line
is less than 256 chars.
ie "line1\nline2\nline3\n"
is: line1
line2
line3
_DIR:
These 2 strings define the abbreviation for directory. The first
must be padded to 8 chars and the second must be 4 chars.
_BREAK:
The string printed when a person breaks newlist with CTRL-C
_MATCH:
The 2 strings printed when a file doesn't match a pattern or
no files are found in hunt mode.
_COMMENT:
The 2 strings printed telling you that the file has a comment attached
to it. The first is a lengthy for used with '%C' which is "Comment"
and the second is a short form used with '%c' which is 'c'
_LOWMEM:
Printed when newlist is out of memory.
_EXEC:
Two strings printed when newlist is executing a string with [-E].
The first is a simple header saying 'Executing: xyz' The
second is the error message when a program or format fails to run.
_UNKNOWN:
Printed when a link cannot be found/translated.
_MONTHS:
The 12 months of the year.
_DAYS:
The 7 days of the week and 4 misc days: tomorrow, today, yesterday,
and future.
_CENTER:
This optional format allows you to define the centered day names
yourself if your native language has day names longer than 9 chars.
=======================
WB2.0 tip O' the day 1:
=======================
Do you miss the really fast scroll displays of wb1.3? I've found
a way to get them back! You can open a shell that disables the
super-auto-refresh and console cut-and-paste to increase scrolling
speed by 20+%! Do the following to open a WB1.3 style fast shell:
newshell CON:0/0/640/200/PhilDOS/CLOSE/SMART
^
this is the secret!
To gain even more speed, use a 2 color public screen and close WB.
=======================
WB2.0 tip O' the day 2:
=======================
Wish your shell had more than 80 columns? Now you can use any size
font with WB2.0's neat new command setfont. Try this out:
setfont topaz 7 scale and setfont topaz 20 scale
^ ^
this is the secret! -----------+
NewList will recognize the new font and will adjust its output!
Try the 7 point font and nl -q. Cool huh!
======
TIP 3:
======
Want newlist to run like ls or lsjr? Simply put [-q] in ENV:NEWLIST_BOTH
and then use the alias 'lsjr' found in the file called 'scripts/aliases'
========================
How to install Newlist8:
========================
IMPORTANT
For each release of Newlist, you should install a new language file.
You must also kill any existing language file you may have in memory
with: newlist -K
If you do not kill the existing language, you may end up with
invisible/garbled strings.
You may also have to kill the old RESIDENT newlist in memory...
The install script below will try to kill the language and the
resident newlist as well.
To verify that your language file is compatible with your version of
Newlist, use the 'version' command from Commodore. The Newlist versions
should be the same (ie this language runs under Newlist 8)
version c:nl
Newlist 8 (xx.yy.zz)
version env:newlist_lang
Newlist 8 (aa.bb.cc)
EASY INSTALLATION
From WB:
To install newlist click the Install-Newlist icon..if that doesnt
work then click the OldInstall-Newlist icon.
From CLI:
If you own installer do:
stack 15000
Installer Install-Newlist
if not then do:
execute OldInstall-NewList
or to install manually:
1) a. copy newlist8 to c:nl
or b. copy newlist8.030 to c:nl
2) c:nl -K ;kill old language in memory
resident c:nl remove ;kill old newlist in memory
3) Add 'resident c:nl pure add' to your s:user-startup script.
4) Set ENV: variables with
setenv ENVARC:NEWLIST "flags" to set conditional flags.
setenv ENVARC:NEWLIST_LONG "flags" to set permanent long flags.
setenv ENVARC:NEWLIST_QUICK "flags" to set permanent quick flags.
setenv ENVARC:NEWLIST_BOTH "flags" to set permanent flags.
5) cd languages
6) execute Install_lang ;to install the language of choice
7) (Optional)
Create any aliases you may need and append them to your
S:Shell-Startup from a Shell with:
copy scripts/aliases s:Newlist_Aliases
echo "execute s:Newlist_Aliases" >>s:shell-startup
IMPORTANT:
You will want to edit s:Newlist_Aliases if you install them
so shell startups can speed up...
===========
Final Note:
===========
Enjoy. Keep in mind: this is a super useful tool!
It's like one of those 1001 in 1 cooking tools.
"Flip the lever, and now it makes
julienne style potatoes! [clap....clap] You get the
slicer, the dicer, the juicer, and turkey jerky maker
for only $49.95! But wait there's more......"
Or my new RonCo favorite:
"Wow. Before he was bald, and now he isn't!"
Oh my....I've lost my mind :-)
Register and recieve unlimited updates, your name in my docs,
and an 'Official' shareware patron certificate to show
off to all of your friends!
Mail comments, tips, bug reports, new features, new languages files,
and donations to:
Phil Dietz -- NCEMRSoft EMAIL: pdietz@cse.unl.edu
PO Box 306
Yutan, Nebraska 68073
USA