From 67197b4b0741fe044ca470cd8c6b0bc45b83ca7d Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 27 Apr 2024 10:51:11 +0200 Subject: [PATCH] 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. --- share/functions/__fish_config_interactive.fish | 2 +- share/functions/fish_update_completions.fish | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index 449c17bb6..aa36cc670 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -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 & diff --git a/share/functions/fish_update_completions.fish b/share/functions/fish_update_completions.fish index 378c96937..8cf99fbac 100644 --- a/share/functions/fish_update_completions.fish +++ b/share/functions/fish_update_completions.fish @@ -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