home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / gnu / bash / bug / 592 < prev    next >
Encoding:
Text File  |  1992-09-03  |  986 b   |  36 lines

  1. Newsgroups: gnu.bash.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!regal.cisco.com!mdb
  3. From: mdb@regal.cisco.com (Mark D. Baushke)
  4. Subject: Re: alias
  5. Message-ID: <MDB.92Sep3120428@regal.cisco.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: cisco Systems Inc., Menlo Park, CA, USA
  8. References: mdb@regal.cisco.com (Mark D. Baushke)
  9. Distribution: gnu
  10. Date: Thu, 3 Sep 1992 20:04:28 GMT
  11. Approved: bug-bash@prep.ai.mit.edu
  12. Lines: 22
  13.  
  14. On 31 Aug 92 15:28:19 GMT, svb@cs.purdue.edu (Stephan Bechtolsheim) said:
  15.  
  16. stvb> How do you get, in an alias, the rest of the command line expanded?
  17. stvb> If I write
  18. stvb> alias xx='echo abc 777 def'
  19. stvb> and
  20. stvb> xx this is fun
  21. stvb> should print
  22. stvb> abc this is fun def
  23.  
  24. stvb> What do I need to write instead of the '777'? Could not find
  25. stvb> anything in the documentation. It's a bug in that it's not
  26. stvb> documented .......  Verson 1.12.....
  27.  
  28. aliases do not do expansion. use a function instead:
  29.  
  30. function xx () { echo abc $* def }
  31.  
  32.  
  33.     Enjoy!
  34.     -- Mark
  35.  
  36.