home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 52 / af052sub.adf / newlist.lha / NewList / Scripts / Aliases next >
Text File  |  1993-07-16  |  7KB  |  151 lines

  1. ; $VER: Newlist 8 (19-Jun-93) Examples of Newlists Power
  2. ;
  3. ; Delete all these comments when you use these in your shell-startup
  4. ;   for a tremendous speedup in shell launching speed...
  5. ;
  6. ;Here are some aliases to try.
  7. ;
  8. ; dir1    -  output similar to ARP dir opt s
  9. ; dir2    -  two column dir.
  10. ; dir3    -  multi-col vertical sorted grouped 
  11. ; dir4    -  3-col vertical sorted grouped truncated
  12. ; dir5    -  Shows how to align dirs on left side instead of on top
  13. ;
  14. ; In order for the next five to emulate properly, you should put [-q] [-qs]
  15. ; or [-qt] in NEWLIST_BOTH so they work by default in short mode.  To
  16. ; show long, you then do 'ls -l' or 'dr -l' like the normal 'ls'.
  17. ;
  18. ;   ddir    -  'ddir' look alike
  19. ;   dr      -  'dr' look alike
  20. ;   ls      -  'ls' look alike
  21. ;   lsjr    -  'lsjr' look alike
  22. ;   prols   -  'prols' look alike
  23. ;
  24. ; dirking -  'dirking' look alike
  25. ; list    -  Commodore 'list' look alike
  26. ; mlist   -  'list' program that came in muFS package
  27. ;
  28. ; stat    -  print stats of a file or dir
  29. ; example1-  compact output
  30. ; example2-  another compact output
  31. ; enter   -  recursively enters dirs.  Output like dir opt all
  32. ; script  -  basics to make a script file.  Only need to add custom format
  33. ;               ie  script >ram:script dh0:*.c -F "copy \'%P\' to ram:"
  34. ;
  35. ; find    -  Like UNIX find.  Will print exact path of files without
  36. ;            any type of headers or footers.  Note: newlist6.0 no longer
  37. ;            needs to turn off headers and footers since ONLY matching
  38. ;            files will show now.  But if you like having the path
  39. ;            expanded, find is still a useful command.
  40. ;
  41. ;            usage  find RootPath[:/]FilePattern
  42. ;               ie  find dh0:*.lzh      finds all    lzh files on dh0:
  43. ;                   find dh0:source/*.o finds all object files in dh0:source
  44. ;
  45. ;            output: Dh0:lc/examples/avail.c
  46. ;                    Dh0:lc/examples/boxomatic.c
  47. ;                    Dh0:lc/examples/cat.c
  48. ;                  
  49. ; color   -  a very cool alias.  Lots of colors and text styles.
  50. ;            Color shows off ansi sequencing to produce color, italics,
  51. ;            bold, etc.  Try this one out!
  52. ;
  53. ;            Here's some hints:
  54. ;               \e[0m  plain text          \e[30-39m  Forground color
  55. ;               \e[1m  bold  text          \e[41-49m  Background color
  56. ;               \e[3m  italic text         \e[7m      Inverse Video
  57. ;               \e[4m  underline text      \f0-9      Set foreground color
  58. ;               \b0-9  Set background clr  \s0-9      Set style
  59. ;               \o     Reset terminal
  60. ;
  61. ; dirtype -  Puts the comment in the output...if you categorize your
  62. ;            files by using 'c:filenote' you can emulate datatypes...
  63. ;
  64. ;            Here's an example output:
  65. ;
  66. ;             -s--rwed   Jun 18 00:06 script    2415 Aliases
  67. ;             ----rwed   Jun 09 02:33   text    2904 Times.doc
  68. ;             ----rwed   Jun 13 02:06   icon     880 Times.doc.info
  69. ;             --p-rwed   Jun 17 15:06   util   18112 NewList
  70. ;             ----rwed   Dec 31 23:59   Comm  170504 Jrcomm
  71. ;             ----rwed   Dec 31 23:59  Noise  224299 mod.klisje_paa_klisje
  72. ;  piper  -  Alias that processes output to conform with piping.
  73. ;            Output comes in single single non-ansi names.
  74. ;
  75. ;            Try   more `piper`
  76. ;            and it'll pipe a file to 'more' from the current directory.
  77. ;
  78. ;  mview   - Uses MultiView to show/hear/play a file.  Allows wildcards
  79. ;            and datatype wildcards.
  80. ;               ie mview pics:*
  81. ;
  82. ;  mview2  - Uses multiview as mview but it requires a datatype....
  83. ;                 mview [DATATYPE] [PATH AND WILD] [FLAGS]
  84. ;
  85. ;                 ie mview2 gif pics:        <- shows all GIFS in pics:
  86. ;                 or mview2 8svx dh0:moan* -H  
  87. ;                    [-H] will make this command play ALL sounds on dh0:
  88. ;                    starting with moan :-)
  89. ;
  90. ;  dinfo   -  Shows all of the datatype values and classes for a file. Handy.
  91. ;
  92. ;netinfo   -  Shows all the networking IDs and names (both muFS and Envoy)
  93. ;
  94. ; Neat eh?
  95. ;
  96. ;
  97. ; Feel free to change them to what you like.  If you want sorts, just slap
  98. ; them in.  If you do not like something, fix it.  Power is given to you!
  99.  
  100. ; A bunch of aliases for dir.
  101. alias dir1     nl -qsy2 []
  102. alias dir2     nl -y2 []
  103. alias dir3     nl -qs []
  104. alias dir4     nl -qt []
  105. alias dir5     nl -/gmssq []
  106.  
  107. ; Formats for popular 'ls' and utility replacements.
  108. ;
  109. ; For these you should put [-q] [-qs] or [-qt] in ENV:NEWLIST_BOTH so
  110. ; the short output is default....just like ls, lsjr, prols, dr, etc.
  111.  
  112. alias ls       nl -IqD "%.3M %2d %5v" []
  113. alias lsjr     nl -IqF "%U %c %4b  %7s %d %n%L %e" -D "%.3M %2d %5v" []
  114. alias prols    nl -zqtF "  %-30n %d %p    %b%L %e" -D "%02d-%.3M-%y" []
  115. alias dr       nl -IqF"%6s %p %d  %n %e" -D "%-9.9A %B" []
  116. alias ddir     nl -qtigmsr -C "\n\f3\b2Directory of \s1%-41.41s\f3\b2 at %02d-%.3M-%02y %02H:%02N:%02S\o\n" []
  117.                 ;Notice how the date characters are in the -X header line and not in a -D.
  118.                 ;A %s in the header string -X signifies the current directory
  119.  
  120. alias mlist    nl -lLzsn []
  121. alias list     nl -lz []
  122. alias dirking  nl  -lzF "%-18.18n %6k %6b %8s %p %d %e" -D "%-9.9A %B" -C "\n\f3Directory of \f1\'%s\'\f3 on \f1%D %A \f3at\f1 %B %I\n\n\f3\s1\s4\s1\s4F i l e N a m e      Keys Blocks    Bytes Flags    Date      Time    \o\n" []
  123.          ; a very long alias that shows how useful aliases are (insted of typing
  124.          ; this every time :-)
  125.          ; NOTE: commodore aliases chop off after 220+ chars.
  126.  
  127. ; EZ to remember Aliases.
  128. alias find     nl -lHhtF "%P" []
  129. alias stat     nl -S []
  130. alias script   nl -Zht []
  131. alias enter    nl -R []
  132. alias pager    nl -p []
  133.  
  134. ; Neat formats and effects
  135. alias dirtype  nl -lscF " %p   %d %6.6N %7.7v %n %e" -D "%.3M %2d %02H:%02N" []
  136. alias color    nl -lzF "\e[3;42;31m%22n \e[0m  \e[1;43;32m%p \e[0m  \e[0;32;41m%-7v\e[0m %d %e" -D "\e[4m%02d.%.3M.%02y\e[0m \e[33m%02H:%02N:%02S\e[0m" []
  137.             ; Instead of \e[3;42;31m I could of used \s3\b2\f1....
  138.             ;      Just a differnt way of showing coloring commands...
  139.  
  140. ; Miscellaneous
  141. alias piper    nl -lZthF"%n" []   ; or slower  nl -ZThqy1 []
  142. alias example1 nl -lF " %22n  %-7s" []
  143. alias example2 nl -lF " %d   %p %c %7v  %n" -D "%02m.%02d.%02y" []
  144.  
  145. alias mview    nl -E "multiview \'%P\'" []
  146. alias mview2   nl -E "multiview \'%P\'" -Y []
  147. alias dinfo    nl -lF "%20.20n %7.7v %D %B %T %G %I" []
  148. alias netinfo  nl -lLF "%20.20n %7.7v %U %o %g  %e %E %f %F %h %H" []
  149.