top | item 42537724

(no title)

coffeeindex | 1 year ago

Is the “foo.fish” name required? Could I have “bar.fish” with “function foo…” inside and still autoload function foo?

discuss

order

ComputerGuru|1 year ago

Not autoload, no. You can have as many functions as you want in a single .fish file, but it'll only be lazily autoloaded if it has the same name as the command you are trying to execute. It's how we avoid doing the I/O of scanning all fish directories and parsing their contents at startup.

PittleyDunkin|1 year ago

...and you can still explicitly source the files if you want to load the functions elsewhere.