如何循环 Fish shell 中的 globs?

How to loop over globs in Fish shell?

我正在尝试对 glob 列表做一个简单的循环。在 bash 它将是

for requirement in "$fish_function_path"/__*; do
    source "$requirement";
done

Fish 等价物是多少?

fish 的语法与 bash 不同。你要

for requirement in "$fish_function_path"/__*
    source $requirement
end

参见官方文档for - perform a set of commands multiple times