@@ -17,13 +17,6 @@ _bitcoin_rpc() {
1717 $bitcoin_cli " ${rpcargs[@]} " " $@ "
1818}
1919
20- # Add wallet accounts to COMPREPLY
21- _bitcoin_accounts () {
22- local accounts
23- accounts=$( _bitcoin_rpc listaccounts | awk -F ' "' ' { print $2 }' )
24- COMPREPLY=( " ${COMPREPLY[@]} " $( compgen -W " $accounts " -- " $cur " ) )
25- }
26-
2720_bitcoin_cli () {
2821 local cur prev words=() cword
2922 local bitcoin_cli
@@ -60,10 +53,9 @@ _bitcoin_cli() {
6053 if (( cword > 3 )) ; then
6154 case ${words[cword-3]} in
6255 addmultisigaddress)
63- _bitcoin_accounts
6456 return 0
6557 ;;
66- getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaccount| listreceivedbyaddress|listsinceblock)
58+ getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaddress|listsinceblock)
6759 COMPREPLY=( $( compgen -W " true false" -- " $cur " ) )
6860 return 0
6961 ;;
@@ -80,14 +72,10 @@ _bitcoin_cli() {
8072 COMPREPLY=( $( compgen -W " add remove" -- " $cur " ) )
8173 return 0
8274 ;;
83- fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount| listreceivedbyaddress|sendrawtransaction)
75+ fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listreceivedbyaddress|sendrawtransaction)
8476 COMPREPLY=( $( compgen -W " true false" -- " $cur " ) )
8577 return 0
8678 ;;
87- move|setaccount)
88- _bitcoin_accounts
89- return 0
90- ;;
9179 esac
9280 fi
9381
@@ -96,12 +84,11 @@ _bitcoin_cli() {
9684 _filedir
9785 return 0
9886 ;;
99- getaddednodeinfo|getrawmempool|lockunspent|setgenerate )
87+ getaddednodeinfo|getrawmempool|lockunspent)
10088 COMPREPLY=( $( compgen -W " true false" -- " $cur " ) )
10189 return 0
10290 ;;
103- getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany)
104- _bitcoin_accounts
91+ getbalance|getnewaddress|listtransactions|sendmany)
10592 return 0
10693 ;;
10794 esac
0 commit comments