Style: replace $cur with $subcommand

It changes nothing but spells out intention more clearly
This commit is contained in:
Vladimir Zhelezov 2020-12-10 06:46:05 +01:00
parent 689ad83668
commit dfc8796b25
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ _hledger_completion_function() {
# Do not ignore them!
if [[ $subcommand == "$cur" ]] && ((i == cword)); then
local subcommandMatches
subcommandMatches=$(grep -c "^$cur" <<< "$_hledger_complist_commands")
subcommandMatches=$(grep -c "^$subcommand" <<< "$_hledger_complist_commands")
if ((subcommandMatches > 1)); then
subcommand=
break

View File

@ -34,7 +34,7 @@ _hledger_completion_function() {
# Do not ignore them!
if [[ $subcommand == "$cur" ]] && ((i == cword)); then
local subcommandMatches
subcommandMatches=$(grep -c "^$cur" <<< "$_hledger_complist_commands")
subcommandMatches=$(grep -c "^$subcommand" <<< "$_hledger_complist_commands")
if ((subcommandMatches > 1)); then
subcommand=
break