Hi Martin, Thank you very much for your quick answer. I set up Fish using sudo in an interactive bash session. I actually issued the command "sudo agi fish". In my ~/.bashrc file agi is defined as a simple Bash alias. I have not defined it anywhere else. It works though.
I do not know much about technicallities. I did not even know that sudo calls bash. I guess that this means that it will be difficult to make sudo understand that I actually want to feed it a Fish function. To me it seems that this makes it quite difficult to use Fish and sudo together. Could I write a Fish function called "sudo"? I could detect if the next argument is agi and then expand it as "apt-get install" and add the rest of the command line to it. This morning I tried something like that. My first attempt failed though, and so I decided to ask if there were no easier solutions. Best wishes, Guido --- On Thu, 8/7/08, Martin Bähr <[EMAIL PROTECTED]> wrote: > From: Martin Bähr <[EMAIL PROTECTED]> > Subject: Re: [Fish-users] Problem with sudo and Fish functions > To: [EMAIL PROTECTED] > Cc: [email protected] > Date: Thursday, August 7, 2008, 3:23 PM > 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. > > if you set fish as root shell it still is questionable if > this can work. > sudo copies the environment to the root shell, but i doubt > it can copy > functions. > does this work with bash? or do you have the function agi > defined as > root as well? > > greetings, martin. > -- > cooperative communication with sTeam - caudium, > pike, roxen and unix > offering: programming, training and administration - > anywhere in the world > -- > pike programmer working in china > community.gotpike.org > unix system- iaeste.(tuwien.ac|or).at > open-steam.org > administrator caudium.org > is.schon.org > Martin Bähr http://www.iaeste.or.at/~mbaehr/ ------------------------------------------------------------------------- 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
