Merge #17282: contrib: remove accounts from bash completion

dd94cc46e4377b14515be24894fd1cb42e233151 contrib: remove accounts from bash completion (fanquake)

Pull request description:

  Also removes `setgenerate`.

ACKs for top commit:
  jonasschnelli:
    utACK dd94cc46e4377b14515be24894fd1cb42e233151

Tree-SHA512: 218aa06841f4a347bb083c7f408c07fe80df7a30f7ce7a1126ec95971a9b66aff7c3c049d269da2c15f629bbde80e8c303bf6562bd5c1a36a6f6fd61ce9133e2
This commit is contained in:
Wladimir J. van der Laan 2019-10-30 11:53:20 +01:00 committed by munkybooty
parent 0cb7934d88
commit 37ef9bb465

View File

@ -17,13 +17,6 @@ _dash_rpc() {
$dash_cli "${rpcargs[@]}" "$@" $dash_cli "${rpcargs[@]}" "$@"
} }
# Add wallet accounts to COMPREPLY
_dash_accounts() {
local accounts
accounts=$(_dash_rpc listaccounts | awk -F '"' '{ print $2 }')
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) )
}
_dash_cli() { _dash_cli() {
local cur prev words=() cword local cur prev words=() cword
local dash_cli local dash_cli
@ -60,10 +53,9 @@ _dash_cli() {
if ((cword > 3)); then if ((cword > 3)); then
case ${words[cword-3]} in case ${words[cword-3]} in
addmultisigaddress) addmultisigaddress)
_dash_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 @@ _dash_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)
_dash_accounts
return 0
;;
esac esac
fi fi
@ -96,12 +84,11 @@ _dash_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)
_dash_accounts
return 0 return 0
;; ;;
esac esac