Files
ardupilot/Tools/completion
Pierre KancirandClaude Opus 5 e04d2022e4 Tools: Completion bash: complete waf away from the checkout root
waf runs from the root of the checkout, but the completion ran ./waf in
whatever directory it was typed in, so BUILD.md's suggested
alias waf="<ardupilot>/modules/waf/waf-light" proposed nothing at all
from a subdirectory.  Ask git for the root, run waf there, and key the
cache on it rather than on the current directory.

Recognise the help by its "Main commands" heading rather than by being
non-empty: a clone whose waf submodule is still missing prints a notice
and exits 0, which passed the old check and cached the handful of
hardcoded words for that directory.

Read the cache variables with ${var-} so a shell with set -u does not
abort on the first tab press.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-16 12:38:48 +10:00
..