Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!gatech!psuvax1!psuvm!t20 From: T20@PSUVM.BITNET (Stephen G. Simpson) Newsgroups: gnu.emacs Subject: Bash question from a novice Message-ID: <89250.114714T20@PSUVM.BITNET> Date: 7 Sep 89 15:47:14 GMT Organization: Penn State University Lines: 54 I'm not sure where on the net to turn for information about Bash, the GNU Bourne Again Shell, so I'll try here. If there is another newsgroup where Bash users hang out, please e-mail me. I am used to DOS where there are all kinds of public domain utilities to enhance the command line. In particular, there is a little item called DOSEDIT which allows you to recall and edit previous commands in a very intuitive way. You use up arrow to scroll back through previous commands, then when you find the one you want, you edit it using the left and right arrow, home, end, delete and insert keys. There is also a more elaborate program called 4DOS which replaces the normal DOS shell, COMMAND.COM. 4DOS incorporates DOSEDIT-style command line editing, aliasing, command completion, and a lot of other enhancements. An older program which does a lot of the same things is Chris Dunford's CED. In trying to get used to Unix, I found that C-shell command line editing is not nearly so flexible or easy to use. Wanting something better, I have been playing around with Bash for the last couple of days. Bash gives me pretty much what I was looking for. I have to use Ctrl-P instead of the up arrow, but that's OK since I am going to have to learn emacs anyway. However, I have some simple questions about aliasing in Bash. For example, I would like to do something like alias f='finger $* | more' so that f rms on the command line would be executed as finger rms | more Unfortunately this doesn't work. It seems that the only way is to use a function definition, function f () { finger $* | more ; } Or, is there a simpler way? In the C Shell, I can do it with alias f 'finger \!* | more' and in the DOS world, CED and 4DOS have a similar capability. Since Bash is supposed to include a superset of the useful features of the C Shell, I thought it ought to have this ability to pass arguments to aliases. Can someone clarify this?