mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-19 20:32:44 +08:00
__fish_config_interactive: use __fish_anypython
This commit is contained in:
parent
4a6438f59a
commit
31cb615671
|
@ -104,14 +104,11 @@ function __fish_config_interactive -d "Initializations that should be performed
|
||||||
# Hence we'll call python directly.
|
# Hence we'll call python directly.
|
||||||
# c_m_p.py should work with any python version.
|
# c_m_p.py should work with any python version.
|
||||||
set -l update_args -B $__fish_data_dir/tools/create_manpage_completions.py --manpath --cleanup-in '~/.config/fish/completions' --cleanup-in '~/.config/fish/generated_completions'
|
set -l update_args -B $__fish_data_dir/tools/create_manpage_completions.py --manpath --cleanup-in '~/.config/fish/completions' --cleanup-in '~/.config/fish/generated_completions'
|
||||||
for py in python{3,2,}
|
if set -l python (__fish_anypython)
|
||||||
if command -sq $py
|
# Run python directly in the background and swallow all output
|
||||||
# Run python directly in the background and swallow all output
|
$python $update_args >/dev/null 2>&1 &
|
||||||
$py $update_args >/dev/null 2>&1 &
|
# Then disown the job so that it continues to run in case of an early exit (#6269)
|
||||||
# Then disown the job so that it continues to run in case of an early exit (#6269)
|
disown >/dev/null 2>&1
|
||||||
disown >/dev/null 2>&1
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user