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
  1. roques commented at 4:41 PM on June 29, 2016: contributor
    • separate completion for bitcoind and bitcoin-cli
    • remove RPC support from bitcoind completion
    • add completion for bitcoin-tx and bitcoin-qt
  2. MarcoFalke added the label Docs and Output on Jun 29, 2016
  3. MarcoFalke added this to the milestone 0.13.0 on Jun 29, 2016
  4. jonasschnelli commented at 6:48 PM on June 29, 2016: contributor

    Nice! Thanks. Concept ACK.

  5. 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.

  6. roques force-pushed on Jul 1, 2016
  7. luke-jr commented at 4:44 PM on July 1, 2016: member

    Concept ACK. Would you mind switching to the standard project copyright header while you're at it?

  8. roques force-pushed on Jul 1, 2016
  9. roques 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.

  10. luke-jr commented at 8:05 PM on July 1, 2016: member

    The "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".)

  11. MarcoFalke commented at 8:50 AM on July 2, 2016: member

    If 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 blame or git log or https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.10.0.md#credits

  12. roques force-pushed on Jul 4, 2016
  13. roques commented at 5:02 PM on July 4, 2016: contributor

    I 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 of src/, especially in contrib/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.

  14. MarcoFalke commented at 9:49 AM on July 5, 2016: member

    Travis 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-0x340000
    
  15. petertodd commented at 6:16 PM on July 5, 2016: contributor

    The 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

  16. laanwj commented at 5:52 AM on July 6, 2016: member

    My 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 ).

  17. MarcoFalke commented at 7:49 AM on July 6, 2016: member

    Anyone knows what is the proper way to test this on fedora with just self-compiled Bitcoin Core?

  18. laanwj commented at 10:13 AM on July 7, 2016: member

    Anyone 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-completion
    

    The 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 command have.

  19. bash-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
    1ba3db6a8e
  20. roques force-pushed on Jul 7, 2016
  21. roques commented at 12:56 PM on July 7, 2016: contributor

    I've looked into testing the completions without installing them and found that the use of have is deprecated. The now updated bash-completion snippets don't do that anymore and when using dh_bash-completion from 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's bash-completion installed and active, you should now be able to simply source the scripts to test them without installing them.

  22. MarcoFalke commented at 11:46 AM on July 8, 2016: member

    Appears 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

  23. 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          gettxout          
    
  24. laanwj commented at 3:53 PM on July 8, 2016: member

    ACK 1ba3db6

  25. MarcoFalke commented at 3:54 PM on July 8, 2016: member

    I am not running the daemon. This is good for merge.

  26. laanwj merged this on Jul 11, 2016
  27. laanwj closed this on Jul 11, 2016

  28. laanwj referenced this in commit 26316ffa7d on Jul 11, 2016
  29. zkbot referenced this in commit 4af99fc45d on Dec 8, 2016
  30. codablock referenced this in commit ea2841ac51 on Sep 19, 2017
  31. codablock referenced this in commit 1699a392c2 on Dec 27, 2017
  32. codablock referenced this in commit 26540aa5d1 on Dec 28, 2017
  33. andvgal referenced this in commit 3d0f139ae9 on Jan 6, 2019
  34. DrahtBot locked this on Sep 8, 2021
Labels

Milestone
0.13.0


github-metadata-mirror

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

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me