Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14864360
D12965.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D12965.id.diff
View Options
diff --git a/doc/productivity.md b/doc/productivity.md
--- a/doc/productivity.md
+++ b/doc/productivity.md
@@ -5,15 +5,16 @@
-----------------
* [General](#general)
- * [Cache compilations with `ccache`](#cache-compilations-with-ccache)
- * [Disable features with `cmake`](#disable-features-with-configure)
- * [Multiple working directories with `git worktrees`](#multiple-working-directories-with-git-worktrees)
+ * [Cache compilations with `ccache`](#cache-compilations-with-ccache)
+ * [Disable features with `cmake`](#disable-features-with-configure)
+ * [Multiple working directories with `git worktrees`](#multiple-working-directories-with-git-worktrees)
+ * [Bash completion for locally built binaries](#bash-completion-for-locally-built-binaries)
* [Rebasing/Merging code](#rebasingmerging-code)
- * [More conflict context with `merge.conflictstyle diff3`](#more-conflict-context-with-mergeconflictstyle-diff3)
+ * [More conflict context with `merge.conflictstyle diff3`](#more-conflict-context-with-mergeconflictstyle-diff3)
* [Reviewing code](#reviewing-code)
- * [Reduce mental load with `git diff` options](#reduce-mental-load-with-git-diff-options)
- * [Reference PRs easily with `refspec`s](#reference-prs-easily-with-refspecs)
- * [Diff the diffs with `git range-diff`](#diff-the-diffs-with-git-range-diff)
+ * [Reduce mental load with `git diff` options](#reduce-mental-load-with-git-diff-options)
+ * [Reference PRs easily with `refspec`s](#reference-prs-easily-with-refspecs)
+ * [Diff the diffs with `git range-diff`](#diff-the-diffs-with-git-range-diff)
General
------
@@ -61,6 +62,21 @@
You can also set up [upstream refspecs](#reference-prs-easily-with-refspecs) to refer to pull requests easier in the above `git worktree` commands.
+### Bash completion for locally built binaries
+
+Bash completion does not work out of the box for locally built binaries, but
+you can make it work for your environment for any binary that has a
+`.bash-completion` file in `/contrib`. In this example, binaries are built
+out-of-tree and we setup bash completion for bitcoin-cli and bitcoind. The
+completion function names can be determined by inspecting the
+`.bash-completion` file for each binary.
+```
+source ./contrib/bitcoind.bash-completion
+complete -F _bitcoind ./bitcoind
+source ./contrib/bitcoin-cli.bash-completion
+complete -F _bitcoin_cli ./bitcoin-cli
+```
+
Rebasing/Merging code
-------------
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 20, 19:03 (3 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5865750
Default Alt Text
D12965.id.diff (2 KB)
Attached To
D12965: [doc] Add notes on how to activate bash completion for locally built binaries
Event Timeline
Log In to Comment