From 58966e96c5d1b6111561fb3f79630617c6314ed2 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 2 Dec 2016 17:09:44 +1300 Subject: [PATCH] Change function names to not clash with Bitcoin, apply to correct binaries --- contrib/bitcoin-cli.bash-completion | 18 +++++++++--------- contrib/bitcoin-tx.bash-completion | 2 +- contrib/bitcoind.bash-completion | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/bitcoin-cli.bash-completion b/contrib/bitcoin-cli.bash-completion index 732981fe7..29723769e 100644 --- a/contrib/bitcoin-cli.bash-completion +++ b/contrib/bitcoin-cli.bash-completion @@ -4,7 +4,7 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. # call $bitcoin-cli for RPC -_bitcoin_rpc() { +_zcash_rpc() { # determine already specified args necessary for RPC local rpcargs=() for i in ${COMP_LINE}; do @@ -18,13 +18,13 @@ _bitcoin_rpc() { } # Add wallet accounts to COMPREPLY -_bitcoin_accounts() { +_zcash_accounts() { local accounts - accounts=$(_bitcoin_rpc listaccounts | awk -F '"' '{ print $2 }') + accounts=$(_zcash_rpc listaccounts | awk -F '"' '{ print $2 }') COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) ) } -_bitcoin_cli() { +_zcash_cli() { local cur prev words=() cword local bitcoin_cli @@ -60,7 +60,7 @@ _bitcoin_cli() { if ((cword > 3)); then case ${words[cword-3]} in addmultisigaddress) - _bitcoin_accounts + _zcash_accounts return 0 ;; getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock) @@ -85,7 +85,7 @@ _bitcoin_cli() { return 0 ;; move|setaccount) - _bitcoin_accounts + _zcash_accounts return 0 ;; esac @@ -101,7 +101,7 @@ _bitcoin_cli() { return 0 ;; getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany) - _bitcoin_accounts + _zcash_accounts return 0 ;; esac @@ -130,7 +130,7 @@ _bitcoin_cli() { # only parse help if senseful if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then - commands=$(_bitcoin_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }') + commands=$(_zcash_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }') fi COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) ) @@ -143,7 +143,7 @@ _bitcoin_cli() { ;; esac } && -complete -F _bitcoin_cli bitcoin-cli +complete -F _zcash_cli zcash-cli # Local variables: # mode: shell-script diff --git a/contrib/bitcoin-tx.bash-completion b/contrib/bitcoin-tx.bash-completion index a83d2979e..0206eba74 100644 --- a/contrib/bitcoin-tx.bash-completion +++ b/contrib/bitcoin-tx.bash-completion @@ -46,7 +46,7 @@ _bitcoin_tx() { return 0 } && -complete -F _bitcoin_tx bitcoin-tx +complete -F _bitcoin_tx zcash-tx # Local variables: # mode: shell-script diff --git a/contrib/bitcoind.bash-completion b/contrib/bitcoind.bash-completion index 17f2606cd..378738877 100644 --- a/contrib/bitcoind.bash-completion +++ b/contrib/bitcoind.bash-completion @@ -3,7 +3,7 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -_bitcoind() { +_zcashd() { local cur prev words=() cword local bitcoind @@ -45,7 +45,7 @@ _bitcoind() { ;; esac } && -complete -F _bitcoind bitcoind bitcoin-qt +complete -F _zcashd zcashd # Local variables: # mode: shell-script