Fix cleanup of autogenerated completions

We were inconsistent about this for no apparent reason.

Also cleaning up in ~/.config/fish/completions is
irrelevant by now since we moved to ~/.local/share/fish 8 years ago.

Now that the parent commit moved it again, cleaning up that one seems
reasonable.
This commit is contained in:
Johannes Altmanninger 2024-04-27 10:51:11 +02:00
parent 62a8b48fd1
commit 67197b4b07
2 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ end" >$__fish_config_dir/config.fish
# We don't want to call `fish -c` since that is unnecessary and sources config.fish again.
# 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 $__fish_config_dir/generated_completions --cleanup-in $__fish_cache_dir/generated_completions
set -l update_args -B $__fish_data_dir/tools/create_manpage_completions.py --manpath --cleanup-in $__fish_user_data_dir/generated_completions --cleanup-in $__fish_cache_dir/generated_completions
if set -l python (__fish_anypython)
# Run python directly in the background and swallow all output
$python $update_args >/dev/null 2>&1 &

View File

@ -1,7 +1,7 @@
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 $__fish_cache_dir/generated_completions --progress $argv
set -l update_args -B $__fish_data_dir/tools/create_manpage_completions.py --manpath --cleanup-in $__fish_user_data_dir/generated_completions --cleanup-in $__fish_cache_dir/generated_completions --progress $argv
if set -l python (__fish_anypython)
$python $update_args
else