Skip to content

Commit

Permalink
__fish_config_interactive: use __fish_anypython
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperfekt committed Apr 28, 2020
1 parent 2bc4228 commit 7aaf8c4
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions share/functions/__fish_config_interactive.fish
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,12 @@ 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
break
end
end
end
Expand Down

0 comments on commit 7aaf8c4

Please sign in to comment.