home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / a / arunz09n.lbr / ALIAS.NZT / ALIAS.NOT
Encoding:
Text File  |  1993-10-26  |  6.4 KB  |  105 lines

  1.  
  2.  
  3. Z3TIPS06.LBR                                            Bill Tishey 12/20/87
  4.  
  5. I have compiled this series of notes/tips relating to ZCPR3 primarily from
  6. messages between users on Z-Node #3 (617-965-7259) and sysop Jay Sage.  Jay
  7. graciously provided me his message base for the effort.  Messages from other
  8. sources may also be included occasionally to expand on certain topics.
  9. --------------------------------------------------------------------------
  10.  
  11. Alias Wildcarding
  12.  
  13.     11/07/87... I use an alias called '.COM, consisting of sd $1*.$2* $*, on 
  14. all three systems here.  It allows me to type ' c<CR> to just see the files 
  15. beginning with a 'c' on current DU:, or I can use more than one letter or 
  16. number to narrow the search further yet.  That alias also makes it possible 
  17. to look at just a few files on another DU: where there are many.  EX: my 
  18. A15: on my 'play machine' contains 272 com files at the present, and if I 
  19. only want to look at the files beginning with 'd' on A15: and am on B1:, I 
  20. can type ' a15:d<CR> and the trick alias will show me all files on A15: that 
  21. begin with a 'd'.  (Ken Jones)
  22.  
  23.     11/07/87... Expanding a bit on my ALIAS .com file '.COM, I have never 
  24. seen anyone mention this capability before on any of the systems I call.  
  25. I also have an alias ER.COM (ERA $1*.$2*) which makes it possible to type 
  26. ER<CR> to ERA the complete DU: I'm on, OR use ER C D<CR> to just ERA the 
  27. files beginning with a 'C' and ext beginning with a 'D'.  No '.' is necessary 
  28. between the 'C & D' because the alias (or ARUNZ, if the alias is in your
  29. ALIAS.CMD file) handles that correctly.  You can use ER C DZ<CR> to get
  30. rid of crunched .DOC files etc.  Unlimited possibilities for Z users and 
  31. aliases or the ALIAS.CMD file.  I would be interested in any trick ways 
  32. others control their systems with aliases' passing parameters.  (Ken Jones)
  33.  
  34.     11/15/87... I will make the change you requested to the 'quote' alias, 
  35. but I do not think the method you use is very good.  If you look at the 'D' 
  36. alias in the ALIAS.CMD file in A0: you will see how I do the same thing.  
  37. The syntax is then the same as a standard command; asterisks are simply 
  38. added to both the filename and filetype.
  39.                 On a more technical note, the syntax $1*.$2* $* does not 
  40. make sense to me.  Why do you have a $* on the end?  It will only repeat 
  41. the first two tokens over again!  Do you mean $-2 instead?
  42.                 I would never have a wildcarding alias for a command like 
  43. ERA.  That is foolishly dangerous in my opinion.  File erasing commands 
  44. should require very deliberate entry.  Can you imagine the little slipup 
  45. of entering "ER F" when you meant "ERA F" to erase a single file and had 
  46. all your files beginning with an F erased before you could do anything 
  47. about it?  (Jay Sage)
  48.  
  49.     11/15/87... Yes, I have been caught one time in the past year with my 
  50. ER.alias, (that was caused by staying up 30+ hours in front of this play 
  51. toy with no sleep though, I think, I AGREE, you HAVE to pay attention when 
  52. you use an ERA program.)  If a user has THAT problem his (or her) system
  53. should probably be set up with ERA VERIFY 'on' so the system will ask
  54. you for each file to erase.
  55.                 I will have to check your ALIAS.CMD file out once again on 
  56. parameter passing.  (Ken Jones)
  57.  
  58.     11/16/87... Jay, sorry, but in your ALIAS.CMD file you put ' SD $1*.$2.* 
  59. $-2 instead of SD $1*.$2* $* .  GEEEZ, that won't do ANYTHING correctly... but 
  60. to work it HAS to be ' SD $1*.$2* AND and it WILL work as I stated earlier.  
  61. Hitting ' a<CR> on your A0: will show files ALIAS.CMD, ALLFILES.DZR  & 
  62. APPLIC .  Doing ' a c<CR> on your A0: will show ONLY  ALIAS.CMD and FROM A0: 
  63. doing ' b:d l<CR> will ONLY show (at 11:19pm Nov 15th) the files DBL4.LBR, 
  64. DIF22.LBR on your B0: directory.  Doing ' B:d<CR> will add the DT42.TZT to 
  65. the above display.  Please change my ' alias to SD $1*.$2*  so it will work.  
  66. You were correct that the 3rd parameter ($*) is NOT needed, thanks for 
  67. bringing that to my attention.  (Ken Jones)
  68.  
  69.     11/17/87... Jay, never took the time before to REALLY SEE what my ALIAS'S 
  70. were doing.  Tonight I did, and learned something.  My '.com ALIAS will NOT 
  71. work correctly without being SD $1*.$2* $* because the way an ALIAS. or 
  72. ARUNZ.cmd passes parameters.  With it set to SD $1*.$2* you can [from ex: 
  73. A0: type] ' b1:a l /l<CR> and it will look on B1: and show all the files 
  74. beginning with A and ext beginning with L (maybe lBR's) but will NOT [with 
  75. out the 3rd parameter $*] pass the /L to LIST out the .LBR files contents.  
  76. So I looked at my ALIAS ER.com and tried it with ERA $1*.$2* $* and then a
  77. command of ER e c i<CR> to get rid of some test files starting with E and
  78. ext starting with C.  Well, of all things, it will NOT work with $* as the
  79. 3rd parameter.  It just ERA'ed all the E*.C* files...soooo, UNERA them
  80. and try ER $1*.$2* $3* and see.  Now it works fine.  Command of ER E C I
  81. <CR>ASKS for my OK on each file beginning with E and ext beginning with E
  82. since the 3rd parameter is turning on the QUERY mode of ERA!  (Ken Jones)
  83.  
  84.     11/17/87... Continuing on passing PARAMETERS:  Question: Why will '.ALIAS 
  85. work correctly with the 3rd parameter of $* as does UN.alias =[UNCRUNCH 
  86. $1*.$2* $*]but ER.alias MUST have the 3rd parameter as $3* [in ERA $1*.$2* 
  87. $3*] to work correctly?  Why won't it pass the "I" as the 3rd parameter 
  88. unless the 3rd parameter IS $3* instead of $*  ?  Answers from some of the
  89. Guru's out there in Z3.* land would be appreciated by some of us users
  90. that are lazy and don't want to type the WHOLE fn.ext to do something. I
  91. try to DL the ALIAS.CMD file whenever on a RAS, but remote ALIAS.CMD
  92. files by nature can not be as full of goodies as a private system such
  93. as the ALIAS.CMD file I have on my R & D Machine vs: the one I have on
  94. Z-node #4 for remote users.  Thank you Jay Sage and ALL the others for
  95. Z3.3, It is GREAT!  (Ken Jones)
  96.  
  97.     11/17/87... Ken, the $* parameter in an alias script refers to the 
  98. entire command tail. Thus, if you define your "e" alias as ERA $1*.$2* $*
  99. and say someting like:  E C L I  , what you'll get is  ERA C*.L* C L I
  100. which is not exactly what you want, is it?  What you should  really use
  101. instead of $* is $-2 which is the command tail minus the first two tokens.
  102. (Howard Goldstein)
  103.  
  104. --------------------------------------------------------------------------
  105.