Skip to content

Commit 6daddc4

Browse files
committed
Merge bitcoin#17282: contrib: remove accounts from bash completion
dd94cc4 contrib: remove accounts from bash completion (fanquake) Pull request description: Also removes `setgenerate`. ACKs for top commit: jonasschnelli: utACK dd94cc4 Tree-SHA512: 218aa06841f4a347bb083c7f408c07fe80df7a30f7ce7a1126ec95971a9b66aff7c3c049d269da2c15f629bbde80e8c303bf6562bd5c1a36a6f6fd61ce9133e2
2 parents 5728f88 + dd94cc4 commit 6daddc4

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

contrib/bitcoin-cli.bash-completion

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)