On 10/4/06, James Hughes <[EMAIL PROTECTED]> wrote: > On 10/4/06, Axel Liljencrantz <[EMAIL PROTECTED]> wrote: > > On 10/3/06, James Hughes <[EMAIL PROTECTED]> wrote: > > > > > > I'm trying to add functions using the method outlined here: > > > > > > http://www.mail-archive.com/[email protected]/msg00805.html > > ~> functions foo > function foo --description echo\ hello\; > echo hello; > end > > [EMAIL PROTECTED] ~> foo > hello > [EMAIL PROTECTED] ~> functions foo > ~/.fish.d/functions/foo.fish > > Switch to new fish instance (a new tab in mrxvt): > > ~> foo > fish: Unknown command 'foo' > [EMAIL PROTECTED] ~> > > > > > > Some possible problems: > > > > * Did you forget the '.fish' suffix for the file? > > ls ~/.fish.d/functions/ > foo.fish* ptsdb.fish* pts.fish* > > > * Check that ~/.fish.d/functions is one of the elements of the > > $fish_function_path variable (It is by default) > > ~> echo $fish_function_path > > ~> > > hmm. > ~> set -U fish_function_path ~/.fish.d/functions > ~> echo $fish_function_path > /home/jhughes/.fish.d/functions > ~> > > Switch to new terminal: > > ~> foo > fish: Unknown command 'foo' > [EMAIL PROTECTED] ~> > > > > * Try sourcing the file you created in another shell and verify that > > you get the function then. (e.g. for the command 'some_command', use > > '. ~/.fish.d/functions/some_command.fish; some_command'. > > This works. But as the pasted output above hopefully demonstrates, the > $fish_function_path is not being honoured. This is the latest ubuntu > package. > > Am I doing something wrong?
As near as I can tell, you are doing everything right. But the /etc/fish file should contain the following line: set -g fish_function_path ~/.fish.d/functions /etc/fish.d/functions /usr/share/fish/functions So something _is_ going wrong, though it may not be your fault. Since setting a universal variable doesn't fix this, it is possible that the $fish_function_path variable really is set, but to an empty value. A non-universal value will always override a universal one. So you could try verifying that the universal variable is used by checking the output of 'echo $fish_function_path'. If that doesn't help, I would suggest trying out the latest debian package, since the Debian package is usually of a later version. (The latest version is 1.21.12) > > James > -- Axel ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
