mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
nix: allow whitespace characters before command in repl
Before this change, processLine always uses the first character as the start of the line. This cause whitespaces to matter at the beginning of the line whereas it does not matter anywhere else. This commit trims leading white spaces of the string line so that subsequent operations can be performed on the string without explicitly tracking starting and ending indices of the string.
This commit is contained in:
parent
d9cfd853e5
commit
cbcb69a39c
1 changed files with 1 additions and 0 deletions
|
@ -396,6 +396,7 @@ StorePath NixRepl::getDerivationPath(Value & v) {
|
|||
|
||||
bool NixRepl::processLine(std::string line)
|
||||
{
|
||||
line = trim(line);
|
||||
if (line == "") return true;
|
||||
|
||||
_isInterrupted = false;
|
||||
|
|
Loading…
Reference in a new issue