From 13b089b586c0f0c179cec0b4f95d7ba7e75fb9b5 Mon Sep 17 00:00:00 2001 From: novenary Date: Sun, 30 Nov 2025 23:01:33 +0200 Subject: [PATCH] Revert "fish: avoid shadowing builtin completions" This reverts commit 23f2ba7ae046d33c347fc82a6fc20b7b51e6cbd0. --- modules/programs/fish.nix | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 0d6d04118..b078bf6d1 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -628,30 +628,9 @@ in mkdir -p $out for src in $srcs; do if [ -d $src/share/man ]; then - while IFS= read -r manpage; do - # Approximate the corresponding command for this manpage - bin="$(basename "$manpage")" - bin="''${bin%%.*}" - bin="$src/bin/$bin" - - # Check for builtin completion - if - [ -e "$bin" ] && - fish \ - --no-config \ - --command 'complete --do-complete $argv[1]' \ - -- "$bin" \ - >/dev/null 2>&1 - then - echo "Found builtin completion for $bin (skipping)" - continue - fi - - # Generate completion based on the manpage - python ${cfg.package}/share/fish/tools/create_manpage_completions.py \ - --directory "$out" "$manpage" > /dev/null - - done < <(find -L "$src/share/man" -type f) + find -L $src/share/man -type f \ + -exec python ${cfg.package}/share/fish/tools/create_manpage_completions.py --directory $out {} + \ + > /dev/null fi done '';