2

I have a fish function in a file called mvnw.fish in /Users/myUser/.config/fish/functions

The /Users/myUser/.config/fish/functions directory does appear (in first position, not that it matters) in $fish_function_path variable.

My function seems valid:

function mvn-or-mvnw
  if [ -f ./mvnw ]
      echo "Executing mvnw instead of mvn"
      ./mvnw $argv
  else
      mvn $argv
  end
end

And if I source it explicitly it does work fine. But never is it picked up automatically by fish.

What am I doing wrong?

1 Answer 1

3

You should have at least one function with the same name as the basename of the autoloaded file. In other words, either rename your file to mvn-or-mvnw.fish or rename the function to mvnw.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .