1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-05 16:41:04 +01:00

Revert "fish: avoid shadowing builtin completions"

This reverts commit 23f2ba7ae0.
This commit is contained in:
novenary 2025-11-30 23:01:33 +02:00 committed by Austin Horstman
parent 784a83782c
commit 13b089b586

View file

@ -628,30 +628,9 @@ in
mkdir -p $out mkdir -p $out
for src in $srcs; do for src in $srcs; do
if [ -d $src/share/man ]; then if [ -d $src/share/man ]; then
while IFS= read -r manpage; do find -L $src/share/man -type f \
# Approximate the corresponding command for this manpage -exec python ${cfg.package}/share/fish/tools/create_manpage_completions.py --directory $out {} + \
bin="$(basename "$manpage")" > /dev/null
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)
fi fi
done done
''; '';