diff --git a/tom/include/tom/commands/stubs/integratestubs.hpp b/tom/include/tom/commands/stubs/integratestubs.hpp index 0f4effe42..89c7a460c 100644 --- a/tom/include/tom/commands/stubs/integratestubs.hpp +++ b/tom/include/tom/commands/stubs/integratestubs.hpp @@ -118,7 +118,7 @@ _tom() local tom_command i for ((i = 1; i < ${#words[@]}; i++)); do if [[ ${words[i]} != -* ]]; then - # Command found but is actually completing now + # Command is considered found only if isn't currently completing if [[ $i -ne $cword ]]; then tom_command=${words[i]} fi diff --git a/tools/completions/tom.bash b/tools/completions/tom.bash index 3d655828a..31178b603 100644 --- a/tools/completions/tom.bash +++ b/tools/completions/tom.bash @@ -73,7 +73,7 @@ _tom() local tom_command i for ((i = 1; i < ${#words[@]}; i++)); do if [[ ${words[i]} != -* ]]; then - # Command found but is actually completing now + # Command is considered found only if isn't currently completing if [[ $i -ne $cword ]]; then tom_command=${words[i]} fi