From owner-freebsd-questions@FreeBSD.ORG Thu Sep 3 23:34:09 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50EB9106566B for ; Thu, 3 Sep 2009 23:34:09 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 23C608FC08 for ; Thu, 3 Sep 2009 23:34:08 +0000 (UTC) Received: from smoochies.rachie.is-a-geek.net (mailhub.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 8ADAE7E853 for ; Thu, 3 Sep 2009 15:34:19 -0800 (AKDT) From: Mel Flynn To: freebsd-questions@freebsd.org Date: Fri, 4 Sep 2009 01:34:05 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA3; KDE/4.2.4; i386; ; ) References: <20090902072659.7829da56@scorpio.seibercom.net> In-Reply-To: <20090902072659.7829da56@scorpio.seibercom.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909040134.05992.mel.flynn+fbsd.questions@mailing.thruhere.net> Subject: Re: 'alias' + sudo X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 23:34:09 -0000 On Wednesday 02 September 2009 13:26:59 Jerry wrote: > I have set up several 'alias' definitions in my .bashrc file. They are > honored when run as either a regular user or as root. However, when I > prefix a command with 'sudo', the alias is no longer honored. In other > words, the actual command is run;however, any flags that I was passing > to it via 'alias' are lost. How can I circumvent this annoyance. > > Example, I often use 'pico' from within 'xterm'. I set up an alias that > causes pico to use the mouse; i.e., pico -m which works fine as long as > I do not prefix the command with 'sudo' alias spico='/usr/local/bin/sudo pico -m' and be done with it. -- Mel