Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-04-2007, 11:39 AM
|
#1
|
LQ Newbie
Registered: Feb 2006
Posts: 2
Rep:
|
aliases with bash shell
On my old linux box (FC4), I had the following line in my .cshrc file:
alias emacs 'emacs \!* &'
On my new computer (Ubuntu 7.10), I'd like to have the same alias. I noticed that there was a .bashrc file, so I tried to put the same line in it. After changing the syntax to:
alias emacs='emacs \!* &'
it sources, but I get the following error if I try to open a file:
$ emacs file.txt
[1] 7296
bash: file.txt: command not found
which then opens up emacs but not file.txt.
Since I'm not the one who wrote the original line, I'm not sure what I need to change or where to even look for info about linux wildcard characters.
Thanks in advance for the help.
- Ed
|
|
|
11-04-2007, 12:10 PM
|
#2
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Hi,
And welcome to LQ!
Paragraph 3 of that section says:
Quote:
There is no mechanism for using arguments in the replacement text. If
arguments are needed, a shell function should be used (see FUNCTIONS
below).
|
Cheers,
Tink
|
|
|
11-04-2007, 12:46 PM
|
#3
|
LQ Newbie
Registered: Feb 2006
Posts: 2
Original Poster
Rep:
|
Thank you! For anyone interested, here's the equivalent:
emacs () { emacs "$@" & }
|
|
|
11-04-2007, 12:59 PM
|
#4
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Well done :}
Nice to see people who can actually read man-pages.
Cheers,
Tink
|
|
|
All times are GMT -5. The time now is 08:36 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|