Revert "fish: avoid shadowing builtin completions"
This reverts commit23f2ba7ae0. (cherry picked from commit13b089b586)
This commit is contained in:
parent
acd2931703
commit
ffae9e1bca
1 changed files with 3 additions and 24 deletions
|
|
@ -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
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue