diff --git a/src/client/interface/components/terminal/TerminalTextField.tsx b/src/client/interface/components/terminal/TerminalTextField.tsx index 11692f78..49bce8ba 100644 --- a/src/client/interface/components/terminal/TerminalTextField.tsx +++ b/src/client/interface/components/terminal/TerminalTextField.tsx @@ -200,7 +200,13 @@ export function TerminalTextField({ newText = newText.sub(0, newText.size() - parts[parts.size() - 1].size()); } - newText += currentSuggestion.others[0]; + let suggestion = currentSuggestion.others[0]; + + if (string.match(suggestion, "%s")[0] !== undefined) { + suggestion = `"${suggestion}"` + } + + newText += suggestion if (argIndex < commandArgs.size() - 1) { newText += " "; }