From 31cb6156715e4ad1be6cf608c9dc8cba7a6b6bd3 Mon Sep 17 00:00:00 2001 From: hyperfekt Date: Tue, 28 Apr 2020 13:05:20 +0200 Subject: [PATCH] __fish_config_interactive: use __fish_anypython --- share/functions/__fish_config_interactive.fish | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index 9a2a754cf..dfd6f0f11 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -104,14 +104,11 @@ function __fish_config_interactive -d "Initializations that should be performed # Hence we'll call python directly. # 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' - for py in python{3,2,} - if command -sq $py - # Run python directly in the background and swallow all output - $py $update_args >/dev/null 2>&1 & - # Then disown the job so that it continues to run in case of an early exit (#6269) - disown >/dev/null 2>&1 - break - end + if set -l python (__fish_anypython) + # Run python directly in the background and swallow all output + $python $update_args >/dev/null 2>&1 & + # Then disown the job so that it continues to run in case of an early exit (#6269) + disown >/dev/null 2>&1 end end end