Files
fish-shell/share/functions/__fish_is_standalone.fish
Johannes Altmanninger c409e816df Don't branch on __fish_data_dir[1] in standalone builds
We use absence of "$__fish_data_dir[1]" as criteria to use the
"standalone" code paths that use "status list-files/get-file" instead
of $__fish_data_dir.

However, third party software seems slow to react to such breaking
changes, see https://github.com/ajeetdsouza/zoxide/issues/1045

So keep $__fish_data_dir for now to give plugins more time.
This commit makes us ignore $__fish_data_dir on standalone builds
even if defined; a  following commit will actually define it again.

I guess the approach in b815fff292 (Set $__fish_data_dir to empty
for embed-data builds, 2025-04-01) made sense back when we didn't
anticipate switching to standalone builds by default yet.
2025-11-01 12:58:13 +01:00

12 lines
226 B
Fish

# localization: skip(private)
set -l is_standalone (
if status get-file config.fish &>/dev/null
echo true
else
echo false
end
)
function __fish_is_standalone -V is_standalone
$is_standalone
end