FISH: How to set a specific $fish_function_path while launching fish?

I’m trying to use the sshrc to execute fish with my own defined functions at the remote server.

I know there is a $fish_function_path variable that I can modify to prepend my custom path with my functions, but this variable seems global and I don’t want to affect other fish users.

Is there any way to change this variable only for my single fish session or any other ways to use my fish functions only for a single session?

I have also tried setting and environment variable from the outer shell: fish_functions_path="$MY_FUNCTIONS_PATH" fish but it seems environment variables don’t affect those inner variables of fish.

Used this docs.

Thanks!


Source: shell

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.