From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Shell aliases as shell-commands Date: Thu, 22 Jan 2009 12:52:53 +0100 Organization: Universitaet Jena Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1232628100 2292 80.91.229.12 (22 Jan 2009 12:41:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Jan 2009 12:41:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 22 13:42:51 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LPytV-0000GN-Sz for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Jan 2009 13:42:50 +0100 Original-Received: from localhost ([127.0.0.1]:40101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPysE-0006AT-If for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Jan 2009 07:41:30 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newshub.sdsu.edu!feeder.erje.net!news-1.dfn.de!news.uni-weimar.de!news.uni-jena.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 18 Original-NNTP-Posting-Host: pax07e3.mipool.uni-jena.de Original-X-Trace: lc03.rz.uni-jena.de 1232625173 29103 141.35.13.42 (22 Jan 2009 11:52:53 GMT) Original-X-Complaints-To: abuse@uni-jena.de Original-NNTP-Posting-Date: Thu, 22 Jan 2009 11:52:53 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) Cancel-Lock: sha1:wYwDTGVibn+tueeQdQo8HYvb4Fg= Original-Xref: news.stanford.edu gnu.emacs.help:166234 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61558 Archived-At: Hello, I agree that that my solution with BASH_ENV is not very clean. I would suggest the following elisp code which works without setting env vars: (defadvice shell-command (before my-shell-command activate) (ad-set-arg 0 (concat "source ~/.bashrc; shopt -s -q expand_aliases;\n " (ad-get-arg 0)))) (you could replace .bashrc by an individual file especially written for that purpose). What do you think about it? Michael