help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shell aliases as shell-commands


From: Michael Heerdegen
Subject: Re: Shell aliases as shell-commands
Date: Thu, 22 Jan 2009 12:52:53 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix)

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]