# \[CPP, Shell, #EP2\] Script expects previous word when there is none

**URL:** <https://forum.codecrafters.io/t/cpp-shell-ep2-script-expects-previous-word-when-there-is-none/16291>\
**Category:** General\
**Tags:** challenge:shell\
**Created:** [September 27, 2026, 3:03am UTC](https://forum.codecrafters.io/t/cpp-shell-ep2-script-expects-previous-word-when-there-is-none/16291 "2026-09-27T03:03:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sage-p1](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/sage-p1/32/28868_2.png) [@sage-p1](https://forum.codecrafters.io/u/sage-p1)\
**Post date:** [September 27, 2026, 3:03am UTC](https://forum.codecrafters.io/t/cpp-shell-ep2-script-expects-previous-word-when-there-is-none/16291/1 "2026-09-27T03:03:25Z")

</div>

Can someone explain why the solver expects the third argument to be “git” in the second tab press for completion? The full command is “git re” and has no third term, so I expect argv[3] to be an empty string.

 ![Screenshot 2026-09-26 at 11.01.36 PM](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/0/8/085bd0b9860a39542bb38ab1ad4ed1417b91c566.png)
