[doc] Add notes on how to activate bash completion for locally built binaries
Summary:
This does not appear to be officially supported (see https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html) but works well enough on Debian that its worth sharing.
I purposefully did not amend the ./contrib/*.bash-completion files to include
relative paths to binaries since this may have negative impacts for some users.
For example, ./bitcoin-cli would match for any bitcoin software fork that has
not renamed the bitcoin-cli binary. This could result in completions applied
to the wrong binaries. It is best to leave this decision to the user since they
can source different .bash-completion files only in the appropriate session.
Test Plan:
source ./contrib/bitcoind.bash-completion complete -F _bitcoind ./bitcoind mkdir build && cd build && cmake -GNinja .. && ninja ./src/bitcoind -testnet -daemon # type this out using tab-completion cd src ./bitcoin-cli -testnet # type this out using tab-completion, hit space then # tab again to see RPC commands
Note: bitcoind must be running in order for RPC command tab completion to work.
This is expected.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D12965