diff --git a/components/REPL/REPLInput.tsx b/components/REPL/REPLInput.tsx index 6cdf714..4e7c74c 100644 --- a/components/REPL/REPLInput.tsx +++ b/components/REPL/REPLInput.tsx @@ -75,7 +75,8 @@ const REPLInput: NextPage = ({historyCallback, historyClear, in e.preventDefault(); } if (e.key === "Tab" && currentCmd.length !== 0) { - setInput(input, currentCmd[justTabbed % currentCmd.length]); + const cmd = `${currentCmd[justTabbed % currentCmd.length]}${currentCmd.length === 1 ? " " : ""}`; + setInput(input, cmd); setJustTabbed(justTabbed + 1); return false; } else setJustTabbed(0);