LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-23-2002, 06:07 AM   #1
ngomong
Member
 
Registered: Apr 2002
Posts: 54

Rep: Reputation: 15
alias or function in .bashrc, which sends command to background


I'm trying to set up a simple alias that would function thusly:

"e temp.txt" would be the same as typing "emacs temp.txt &"
I've tried:

function e () {
emacs "$1" &
}

... which opens emacs... but it's not sent into the background. (Maintains focus in the xterm).

Does anybody know the solution?
 
Old 04-23-2002, 09:50 PM   #2
ngomong
Member
 
Registered: Apr 2002
Posts: 54

Original Poster
Rep: Reputation: 15
Aha, got it to work...

function ee () { emacs $* & }

For some reason, if the function name is only one letter long, it doesn't work... two or more, and it does.

I'll accept this for now.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
using 'watch' on an alias in .bashrc slackist Linux - General 11 01-29-2016 01:09 PM
adding perm. alias to .bashrc Lleb_KCir Linux - General 7 12-09-2004 02:35 PM
My first alias in .bashrc...'apostrophes 'getting' in the way?' Baix Linux - Newbie 3 06-17-2004 02:36 PM
alias and .bashrc whaase Linux - General 3 11-02-2003 07:03 PM
alias and bashrc Haldir Linux - Newbie 3 06-14-2002 05:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration