You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
no shell for some reason clears the terminal when it encounters null, neither nushell nor powershell do this
that's why when there is no new line and the print ends with null it will clear the entire line, I showed this in the video as I compiled it and ran it with shell multiple times and there was no output
null is bring printed by print_cli, input is NULL so it prints that.
and yes, so when i remove \n the reason it clears the entire line is because NULL for some reason makes shell clear the terminal. Therefore the terminal prints v0.0.1(null), and when it encounters null it will clear that line
thats why in the video you can see when \n is added to the version you can see the version, but NULL doesnt get printed like it should because it gets cleared
Activity
certik commentedon Jul 15, 2025
I don't follow --- is the issue that the
shellprints(null)sometimes? Can you post the program that does that?aramrw commentedon Jul 15, 2025
no shell for some reason clears the terminal when it encounters null, neither nushell nor powershell do this
that's why when there is no new line and the print ends with null it will clear the entire line, I showed this in the video as I compiled it and ran it with shell multiple times and there was no output
certik commentedon Jul 15, 2025
I don't see any null being printed in the C code. Do you print
\0on the screen? Can you please post the code so that I can try it also?However when you remove
\nI can see that the shell will not print the line, right? So that's a bug that we need to fix.aramrw commentedon Jul 17, 2025
null is bring printed by
print_cli, input isNULLso it prints that.and yes, so when i remove
\nthe reason it clears the entire line is becauseNULLfor some reason makes shell clear the terminal. Therefore the terminal printsv0.0.1(null), and when it encounters null it will clear that linethats why in the video you can see when
\nis added to the version you can see the version, butNULLdoesnt get printed like it should because it gets cleared