Hi Fish users, 

I am planning to switch to Fish. I converted a few of my bash aliases into fish 
functions. However, for some reason (unknown to me) it seems that within an 
(interactive) Fish shell I am unable to use sudo in combination with Fish 
functions. 

For example, in ~/.config/fish/config.fish I have defined the following "agi" 
function: 

function agi 
        apt-get install $argv 
end
 
The following output explains my problem: 

[EMAIL PROTECTED] ~> agi install fish
E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
[EMAIL PROTECTED] ~> sudo agi install fish
sudo: agi: command not found
[EMAIL PROTECTED] ~> sudo apt-get install fish
Reading package lists... Done
Building dependency tree       
Reading state information... Done
fish is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

So "agi" only works without sudo. I searched Google, but did not find a 
solution. I tried to use the fish alias function instead but after restarting 
fish the output remained the same. I also added lines like "Defaults 
always_set_home" and "Defaults env_reset" to my /etc/sudoers file. However, 
that did not help either. 

Has someone experienced this before, and how could I resolve this?? 

Thanks in advance, 

Guido van Steen 

P.s. I use ubuntu 8.04. 



      

-------------------------------------------------------------------------
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

Reply via email to