- separate completion for bitcoind and bitcoin-cli
- remove RPC support from bitcoind completion
- add completion for bitcoin-tx and bitcoin-qt
bash-completion: Adapt for 0.12 and 0.13 #8289
pull roques wants to merge 1 commits into bitcoin:master from roques:completion changing 5 files +224 −100-
roques commented at 4:41 PM on June 29, 2016: contributor
- MarcoFalke added the label Docs and Output on Jun 29, 2016
- MarcoFalke added this to the milestone 0.13.0 on Jun 29, 2016
-
jonasschnelli commented at 6:48 PM on June 29, 2016: contributor
Nice! Thanks. Concept ACK.
-
in contrib/bitcoin-tx.bash-completion:None in a57f574eb8 outdated
0 | @@ -0,0 +1,61 @@ 1 | +# bash programmable completion for bitcoin-tx(1) 2 | +1<# Copyright (c) 2016 Christian von Roques <roques@mti.ag>
MarcoFalke commented at 6:52 PM on June 29, 2016:Are the first two chars desired?
roques commented at 8:52 AM on July 1, 2016:Definitely not. Somehow I too often hit «1» instead of «esc» these days.
roques force-pushed on Jul 1, 2016luke-jr commented at 4:44 PM on July 1, 2016: memberConcept ACK. Would you mind switching to the standard project copyright header while you're at it?
roques force-pushed on Jul 1, 2016roques commented at 6:30 PM on July 1, 2016: contributor@luke-jr, I switched to a copyright year range instead of an enumeration, as it is more popular here. I did compare license headers with several other files in
src/and the license looks identical, so there shouldn't be any legal traps in that regard. However, I don't believe my small contributions over the years make me a "Bitcoin Core Developer" yet.luke-jr commented at 8:05 PM on July 1, 2016: memberThe "Copyright Bitcoin Core developers" is essentially saying each author retains copyright to their own contributions; there is no centralised/formal/legal entity. Maybe we should clarify this somewhere. (To be clear, I don't consider this a blocker to your PR, just a "nice to have".)
MarcoFalke commented at 8:50 AM on July 2, 2016: memberIf you are the sole author of the file, it is fine to just put your name and not "Bitcoin Core developers". However, if someone modifies the file, we just put "Bitcoin Core developers" in there to not clutter the headers. The detailed list of authors could then be fetched via
git blameorgit logor https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.10.0.md#creditsroques force-pushed on Jul 4, 2016roques commented at 5:02 PM on July 4, 2016: contributorI did some more digging through the Copyright headers. Below
src/the situation is very clear: Either a file originates with Bitcoin and is "Copyright (c) The Bitcoin Core developers" or it originates from an external project and keeps that project's authors' Copyright headers. Satoshi is an exception to that rule. Outside ofsrc/, especially incontrib/devtools/there are several files which retain their initial authors' Copyright. I like @luke-jr's interpretation and second the wish for an explicit mention of it somewhere in the developer documentation. — My initial resistance was due to me misunderstanding that I was being asked to assign my copyright to somebody else.MarcoFalke commented at 9:49 AM on July 5, 2016: memberTravis failure unrelated in tests.exe:
Application tried to create a window, but no driver could be loaded. Make sure that your X server is running and that $DISPLAY is set correctly. err:systray:initialize_systray Could not create tray window test count = err:seh:setup_exception stack overflow 3648 bytes in thread 0026 eip 00002aef24a23efb esp 00000000001407c0 stack 0x140000-0x141000-0x340000petertodd commented at 6:16 PM on July 5, 2016: contributorThe phrase "Bitcoin Core developers" in the copyright notice just means "developers of Bitcoin Core" - which is anyone at all who has contributed anything. There's a good writeup on this subject that here, which takes into account how distributed revision control systems like git do a good job of recording exact authorship for legal purposes: https://softwarefreedom.org/resources/2012/ManagingCopyrightInformation.html
Concept ACK
laanwj commented at 5:52 AM on July 6, 2016: memberMy initial resistance was due to me misunderstanding that I was being asked to assign my copyright to somebody else.
You cannot 'accidentally' assign your copyright to someone else, only by signing an explicit contract. Some projects (such as leveldb) have a separate contributor license agreement that transfers copyright to a company or organization (to Google in that case). Bitcoin Core does not have that. The only thing you implicitly agree on by contributing is licensing the code under the license of the project (so, MIT ).
MarcoFalke commented at 7:49 AM on July 6, 2016: memberAnyone knows what is the proper way to test this on fedora with just self-compiled Bitcoin Core?
laanwj commented at 10:13 AM on July 7, 2016: memberAnyone knows what is the proper way to test this on fedora with just self-compiled Bitcoin Core?
My guess would be typing this into your shell:
export PATH=$PATH:$BUILDDIR/src source contrib/bitcoin-tx.bash-completion source contrib/bitcoind.bash-completionThe commands need to be in your path. The completion script are simply bash scripts that define a function and install it using
complete. But it doesn't seem to work, it complains about not being able to find the commandhave.1ba3db6a8ebash-completion: Adapt for 0.12 and 0.13
* separate completion for bitcoind and bitcoin-cli * remove RPC support from bitcoind completion * add completion for bitcoin-tx and bitcoin-qt * rely on autoloading of completions
roques force-pushed on Jul 7, 2016roques commented at 12:56 PM on July 7, 2016: contributorI've looked into testing the completions without installing them and found that the use of
haveis deprecated. The now updated bash-completion snippets don't do that anymore and when usingdh_bash-completionfrom bash-completion ≥ 1:2.1-4.2 while building the Debian package will be installed in/usr/share/bash-completion/completions/instead of the deprecated/etc/bash_completion.d/and autoloaded ondemand. @MarcoFalke, for you this should mean that when you have Fedora'sbash-completioninstalled and active, you should now be able to simply source the scripts to test them without installing them.MarcoFalke commented at 11:46 AM on July 8, 2016: memberAppears to be working:
$ src/qt/bitcoin-qt - Display all 101 possibilities? (y or n) -? -datacarrier -loadblock= -onlynet= -rpcallowip= -torcontrol= -addnode= -datacarriersize -logips -par= -rpcauth= -torpassword= -alertnotify= -datadir= -logtimestamps -paytxfee= -rpcbind= -txconfirmtarget= -banscore= -dbcache= -maxconnections= -peerbloomfilters -rpccookiefile= -txindex -bantime= -debug= -maxmempool= -permitbaremultisig -rpcpassword= -uacomment= -bind= -disablewallet -maxorphantx= -pid= -rpcport= -upgradewallet -blockmaxcost= -discover -maxreceivebuffer= -port= -rpcthreads= -usehd -blockmaxsize= -dns -maxsendbuffer= -printtoconsole -rpcuser= -version -blockminsize= -dnsseed -maxtimeadjustment -proxy= -salvagewallet -wallet= -blocknotify= -externalip= -maxtxfee= -proxyrandomize -seednode= -walletbroadcast -blockprioritysize= -fallbackfee= -maxuploadtarget= -prune= -server -walletnotify= -bytespersigop -forcednsseed -mempoolexpiry= -reindex -shrinkdebugfile -whitebind= -checkblocks= -help-debug -mempoolreplacement -reindex-chainstate -spendzeroconfchange -whitelist= -checklevel= -keypool= -min -rescan -splash -whitelistforcerelay -choosedatadir -lang= -minrelaytxfee= -resetguisettings -sysperms -whitelistrelay -conf= -listen -mintxfee= -rest -testnet -zapwallettxes= -connect= -listenonion -onion= -rootcertificates= -timeout=Though, I couldn't get it work with the cli:
$ source contrib/bitcoin-cli.bash-completion $ src/bitcoin-cli -regtest g[tab][tab]shows nothing
laanwj commented at 3:50 PM on July 8, 2016: member@MarcoFalke Seems to work here, do you have the daemon running? I think it queries the remote for the command list:
(8289)$ src/bitcoin-cli -regtest ge↹ generate getaddressesbyaccount getblockcount getconnectioncount getmempoolentry getnetworkinfo getrawtransaction gettxoutproof generatetoaddress getbalance getblockhash getdifficulty getmempoolinfo getnewaddress getreceivedbyaccount gettxoutsetinfo getaccount getbestblockhash getblockheader getinfo getmininginfo getpeerinfo getreceivedbyaddress getunconfirmedbalance getaccountaddress getblock getblocktemplate getmempoolancestors getnettotals getrawchangeaddress gettransaction getwalletinfo getaddednodeinfo getblockchaininfo getchaintips getmempooldescendants getnetworkhashps getrawmempool gettxoutlaanwj commented at 3:53 PM on July 8, 2016: memberACK 1ba3db6
MarcoFalke commented at 3:54 PM on July 8, 2016: memberI am not running the daemon. This is good for merge.
laanwj merged this on Jul 11, 2016laanwj closed this on Jul 11, 2016laanwj referenced this in commit 26316ffa7d on Jul 11, 2016zkbot referenced this in commit 4af99fc45d on Dec 8, 2016codablock referenced this in commit ea2841ac51 on Sep 19, 2017codablock referenced this in commit 1699a392c2 on Dec 27, 2017codablock referenced this in commit 26540aa5d1 on Dec 28, 2017andvgal referenced this in commit 3d0f139ae9 on Jan 6, 2019DrahtBot locked this on Sep 8, 2021
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 21:15 UTC
More mirrored repositories can be found on mirror.b10c.me