On 10/23/06, Axel Liljencrantz <[EMAIL PROTECTED]> wrote: > On 10/23/06, Philip Ganchev <[EMAIL PROTECTED]> wrote: [...] > > Fish seems to be reverting to the default prompt after the pager > > exits. This only happens when the comand line is empty or contains > > only spaces. [...] [...] > Is your fish_prompt function defined in ~/.config/fish/functions? > What is the value of $fish_function_path on startup, and what is its > value after the prompt reverts? > Does this always happen, or only occasionally? > Is it always the pager that causes this or have you found some other > way to trigger it? > > Thanks for the report.
Ah! My function was defined in a file called "~/.config/fish/functions/interactive.fish", sourced at startup. This is how fish used to work a long time ago, and I have somehow missed the change. I never re-read the documentation, because everything worked as expected. Should teach me not to stick around one project for so long :-) Putting the function in "~/.config/fish/functions/foo.fish" fixes this. That was the same cause for the other problem I reported earlier, and I was equally surprised. >From the documentation I understant that there are now some functions (called autoloaded functions) that are not kept in memory, but instead treated similar to external commands. When you issue a command, fish looks for a file by that name in the directories listed in variable "PATH"; if it does not find it, it looks for a file with the right name in the directories listed in variable "fish_function_path"; if it finds that, it sources it and invokes the function. Something like that? That could be clearer in the documentation as well as the error messages. I will write something as soon as I've got it. But the function was defiend before the pager was invoked. Why isn't it defined after it exits? And this only happens when there is no command on the comman line, not for example when the pager completes "ls<Tab>". That also relates to my question from another post about differences between scripts and functions. In a sense, you were thinking ahead and came close to unifying them. But I think there is more to be said about the relative advantages. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users