Add currency settings, Settings service, and dialog to select fiat currency. Add support for non Official currencies like DOGE when using rates.
This commit is contained in:
@@ -201,6 +201,17 @@ _{{FUNC_NAME}}_completions() {
|
||||
fi
|
||||
;;
|
||||
|
||||
settings)
|
||||
if [[ -z "${subcmd}" ]]; then
|
||||
COMPREPLY=($(compgen -W "show get set" -- "${cur}"))
|
||||
elif [[ "${subcmd}" == "get" || "${subcmd}" == "set" ]]; then
|
||||
local pos=$((cword - subcmd_idx))
|
||||
if [[ $pos -eq 1 ]]; then
|
||||
COMPREPLY=($(compgen -W "currency default-mnemonic" -- "${cur}"))
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
receive)
|
||||
# receive <template> [output]
|
||||
# Template is the first positional argument after `receive`.
|
||||
|
||||
@@ -35,6 +35,7 @@ complete -c {{BIN_NAME}} -s v -d "Verbose output"
|
||||
complete -c {{BIN_NAME}} -l verbose -d "Verbose output"
|
||||
complete -c {{BIN_NAME}} -s o -d "Output file"
|
||||
complete -c {{BIN_NAME}} -l output -d "Output file"
|
||||
complete -c {{BIN_NAME}} -l currency -d "Set fiat display currency"
|
||||
|
||||
# Dynamic completion for `-m/--mnemonic-file`.
|
||||
complete -c {{BIN_NAME}} -s m -l mnemonic-file -xa '(__{{FUNC_NAME}}_complete_dynamic mnemonics)'
|
||||
|
||||
@@ -180,6 +180,17 @@ _{{FUNC_NAME}}_completions() {
|
||||
fi
|
||||
;;
|
||||
|
||||
settings)
|
||||
if [[ -z "${subcmd}" ]]; then
|
||||
compadd -- show get set
|
||||
elif [[ "${subcmd}" == "get" || "${subcmd}" == "set" ]]; then
|
||||
local pos=$((CURRENT - subcmd_idx))
|
||||
if [[ $pos -eq 1 ]]; then
|
||||
compadd -- currency default-mnemonic
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
receive)
|
||||
# receive <template> [output]
|
||||
local pos=$((CURRENT - cmd_idx))
|
||||
|
||||
Reference in New Issue
Block a user