| I have an alias in csh:
| alias ed "emacs \!* &"
| I'm trying to write an alias for bash and can't:
| alias ed="emacs \!* &"
| It doesn't work properly: I can't pass argument (file name) to the subshell
| where emacs is executed in that case.
| Does anyone know how to fight the problem?
In ksh -- and I'm quite sure it's the same for bash -- an alias does a simple
text substitution, and csh's "\!*" construction doesn't apply. To pass a
parameter, you must use a function instead of an alias, and the same would
work in sh as well (if the function definition is understandable by sh),
Note that there must be a space or a newline after the left brace and a
newline or a semicolon before the right brace.
David W. Tamkin Box 3284 Skokie, Illinois 60076-6284 312-714-5610