diff --git a/shell-completion/hledger-completion.bash b/shell-completion/hledger-completion.bash index 9b0080a70..3e14b677c 100644 --- a/shell-completion/hledger-completion.bash +++ b/shell-completion/hledger-completion.bash @@ -32,7 +32,7 @@ _hledger_completion_function() { # $subcommand == reg --> register, register-match, # $subcommand == bal --> balance, balancesheet, balancesheetequity, etc. # Do not ignore them! - if [[ $subcommand == "$cur" ]] && ((i == cword)); then + if ((i == cword)); then local subcommandMatches subcommandMatches=$(grep -c "^$subcommand" <<< "$_hledger_complist_commands") if ((subcommandMatches > 1)); then diff --git a/shell-completion/hledger-completion.bash.m4 b/shell-completion/hledger-completion.bash.m4 index 8b7ae9e43..d9bfe960d 100644 --- a/shell-completion/hledger-completion.bash.m4 +++ b/shell-completion/hledger-completion.bash.m4 @@ -32,7 +32,7 @@ _hledger_completion_function() { # $subcommand == reg --> register, register-match, # $subcommand == bal --> balance, balancesheet, balancesheetequity, etc. # Do not ignore them! - if [[ $subcommand == "$cur" ]] && ((i == cword)); then + if ((i == cword)); then local subcommandMatches subcommandMatches=$(grep -c "^$subcommand" <<< "$_hledger_complist_commands") if ((subcommandMatches > 1)); then