Fix (take 2)

The `$INPUT` was not the problem after further testing. As it is considered a function, Terminal stored the value of `$INPUTCMD` (previously `$INPUT`) and the code would never be able to update it.