fish-shell/share/functions/fish_update_completions.fish
Fabian Homborg 9b1fb6938e Add __fish_anypython helper function
This just finds the first usable python and echos it, so it can then
be used.

We have a few places where we use it and I'm about to add some more.
2019-03-09 18:04:21 +01:00

11 lines
498 B
Fish

function fish_update_completions --description "Update man-page based completions"
# Don't write .pyc files, use the manpath, clean up old completions
# display progress.
set -l update_args -B $__fish_data_dir/tools/create_manpage_completions.py --manpath --cleanup-in ~/.config/fish/generated_completions --progress $argv
if set -l python (__fish_anypython)
$python $update_args
else
printf "%s\n" (_ "python executable not found")
return 1
end
end