mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-10 10:52:31 -05:00
contrib: remove accounts from bash completion
Also removes setgenerate
This commit is contained in:
parent
1ab6c1267e
commit
dd94cc46e4
1 changed files with 4 additions and 17 deletions
|
@ -17,13 +17,6 @@ _bitcoin_rpc() {
|
||||||
$bitcoin_cli "${rpcargs[@]}" "$@"
|
$bitcoin_cli "${rpcargs[@]}" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add wallet accounts to COMPREPLY
|
|
||||||
_bitcoin_accounts() {
|
|
||||||
local accounts
|
|
||||||
accounts=$(_bitcoin_rpc listaccounts | awk -F '"' '{ print $2 }')
|
|
||||||
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) )
|
|
||||||
}
|
|
||||||
|
|
||||||
_bitcoin_cli() {
|
_bitcoin_cli() {
|
||||||
local cur prev words=() cword
|
local cur prev words=() cword
|
||||||
local bitcoin_cli
|
local bitcoin_cli
|
||||||
|
@ -60,10 +53,9 @@ _bitcoin_cli() {
|
||||||
if ((cword > 3)); then
|
if ((cword > 3)); then
|
||||||
case ${words[cword-3]} in
|
case ${words[cword-3]} in
|
||||||
addmultisigaddress)
|
addmultisigaddress)
|
||||||
_bitcoin_accounts
|
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock)
|
getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaddress|listsinceblock)
|
||||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
@ -80,14 +72,10 @@ _bitcoin_cli() {
|
||||||
COMPREPLY=( $( compgen -W "add remove" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "add remove" -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction)
|
fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listreceivedbyaddress|sendrawtransaction)
|
||||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
move|setaccount)
|
|
||||||
_bitcoin_accounts
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -96,12 +84,11 @@ _bitcoin_cli() {
|
||||||
_filedir
|
_filedir
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
getaddednodeinfo|getrawmempool|lockunspent|setgenerate)
|
getaddednodeinfo|getrawmempool|lockunspent)
|
||||||
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany)
|
getbalance|getnewaddress|listtransactions|sendmany)
|
||||||
_bitcoin_accounts
|
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Add table
Reference in a new issue