From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Tennant Newsgroups: gmane.emacs.help Subject: Re: Shell aliases as shell-commands Date: Tue, 20 Jan 2009 11:10:51 +0000 Message-ID: <3afes05g.fsf@vps203.linuxvps.org> References: <87priiqlz6.fsf@iki.fi> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1232518938 9757 80.91.229.12 (21 Jan 2009 06:22:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Jan 2009 06:22:18 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Teemu Likonen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 21 07:23:30 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 1LPWUr-0007Dq-OL for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Jan 2009 07:23:29 +0100 Original-Received: from localhost ([127.0.0.1]:47114 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPWTa-0003OK-9N for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Jan 2009 01:22:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPETs-00005f-8n for help-gnu-emacs@gnu.org; Tue, 20 Jan 2009 06:09:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPETr-000052-0y for help-gnu-emacs@gnu.org; Tue, 20 Jan 2009 06:09:15 -0500 Original-Received: from [199.232.76.173] (port=54198 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPETq-00004w-Qb for help-gnu-emacs@gnu.org; Tue, 20 Jan 2009 06:09:14 -0500 Original-Received: from vps203.linuxvps.org ([91.186.7.203]:51046) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LPETq-0000kD-FL for help-gnu-emacs@gnu.org; Tue, 20 Jan 2009 06:09:14 -0500 Original-Received: from root by vps203.linuxvps.org with local (Exim 4.69) (envelope-from ) id 1LPEVP-0002Rb-PT; Tue, 20 Jan 2009 11:10:51 +0000 In-Reply-To: <87priiqlz6.fsf@iki.fi> (Teemu Likonen's message of "Tue, 20 Jan 2009 13:02:21 +0200") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Wed, 21 Jan 2009 01:21:35 -0500 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:61519 Archived-At: Quoth Teemu Likonen : > Sebastian Tennant (2009-01-20 10:18 +0000) wrote: > >> Quoth Peter Dyballa : >>> Am 20.01.2009 um 10:09 schrieb Sebastian Tennant: >>> >>>> It's 'M-x shell-command' I'm thinking about. >>> >>> Forget it! Shell-command is not meant for interactive use as in a >>> shell with aliases and such comfort. >> >> But my aliases are so handy!!! I want them (without having to run an >> interactive shell), and Emacs can give them to me, I know it can :) > > Aliases work in interactive shell. If you want to use some "aliases" > outside an interactive shell turn them into shell scripts. Which is a lot of work (and not much fun :) Hence my plan to parse my ~/.bashrc (or alias file) and define a command 'M-x alias' which maps names of aliases to their respective definitions. Anyone have any tips on how best to write the parsing routines? Seb