Hi Isaac, Thank you for your explanation. I had though of creating some /usr/bin/ scripts too. I may even define some kind of /usr/bin/my_alias script to create the other scripts. That is much nicer than to depend on creating "unfriendly" Fish functions.
Best wishes, Guido --- On Thu, 8/7/08, Isaac Dupree <[EMAIL PROTECTED]> wrote: > From: Isaac Dupree <[EMAIL PROTECTED]> > Subject: Re: [Fish-users] Problem with sudo and Fish functions > To: "Martin Bähr" <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED], [email protected] > Date: Thursday, August 7, 2008, 3:47 PM > Martin Bähr wrote: > > On Thu, Aug 07, 2008 at 05:30:37AM -0700, > [EMAIL PROTECTED] wrote: > >> [EMAIL PROTECTED] ~> sudo agi install fish > >> sudo: agi: command not found > > > > did you set up fish as a root shell? > > if not, this can't work, because sudo will be > calling bash and that > > won't have agi defined. > > sudo doesn't even call bash. It just searches $PATH > (maybe > even a sanitized $PATH). Your non-root shell has already > done the argument parsing. Decent workarounds include > putting a script in $PATH ... either try somewhere in your > $HOME or use /usr/local/bin or something. E.g. > > cat /usr/local/bin/agi > #!/bin/sh > apt-get install "$@" > > > #don't forget to chmod +x path/to/script > > -Isaac ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
