Rename $wordlist to $complist in _hledger_compgen()

Keep to established conventions
This commit is contained in:
Vladimir Zhelezov 2020-12-11 14:25:22 +01:00
parent e2cac96449
commit ddf55a86a4
2 changed files with 8 additions and 8 deletions

View File

@ -165,14 +165,14 @@ _hledger_compreply_append() {
# compgen to deal with readline. # compgen to deal with readline.
# #
# Arguments: # Arguments:
# $1: a newline separated wordlist with completion cadidates # $1: a newline separated list with completion cadidates
# $2: (optional) a prefix string to add to generated completions # $2: (optional) a prefix string to add to generated completions
# $3: (optional) a word to match instead of $cur, the default. # $3: (optional) a word to match instead of $cur, the default.
# If $match is null and $prefix is defined the match is done against $cur # If $match is null and $prefix is defined the match is done against $cur
# stripped of $prefix. If both $prefix and $match are null we match against # stripped of $prefix. If both $prefix and $match are null we match against
# $cur and no prefix is added to completions. # $cur and no prefix is added to completions.
_hledger_compgen() { _hledger_compgen() {
local wordlist=$1 local complist=$1
local prefix=$2 local prefix=$2
local match=$3 local match=$3
local quoted=() local quoted=()
@ -182,7 +182,7 @@ _hledger_compgen() {
while IFS= read -r word; do while IFS= read -r word; do
_hledger_quote_by_ref "$word" word _hledger_quote_by_ref "$word" word
quoted[i++]=$word quoted[i++]=$word
done <<< "$wordlist" done <<< "$complist"
if (( $# < 3 )); then if (( $# < 3 )); then
match=${cur:${#prefix}} match=${cur:${#prefix}}

View File

@ -165,14 +165,14 @@ _hledger_compreply_append() {
# compgen to deal with readline. # compgen to deal with readline.
# #
# Arguments: # Arguments:
# $1: a newline separated wordlist with completion cadidates # $1: a newline separated list with completion cadidates
# $2: (optional) a prefix string to add to generated completions # $2: (optional) a prefix string to add to generated completions
# $3: (optional) a word to match instead of $cur, the default. # $3: (optional) a word to match instead of $cur, the default.
# If $match is null and $prefix is defined the match is done against $cur # If $match is null and $prefix is defined the match is done against $cur
# stripped of $prefix. If both $prefix and $match are null we match against # stripped of $prefix. If both $prefix and $match are null we match against
# $cur and no prefix is added to completions. # $cur and no prefix is added to completions.
_hledger_compgen() { _hledger_compgen() {
local wordlist=$1 local complist=$1
local prefix=$2 local prefix=$2
local match=$3 local match=$3
local quoted=() local quoted=()
@ -182,7 +182,7 @@ _hledger_compgen() {
while IFS= read -r word; do while IFS= read -r word; do
_hledger_quote_by_ref "$word" word _hledger_quote_by_ref "$word" word
quoted[i++]=$word quoted[i++]=$word
done <<< "$wordlist" done <<< "$complist"
if (( $# < 3 )); then if (( $# < 3 )); then
match=${cur:${#prefix}} match=${cur:${#prefix}}