terrycojones / daudin

A Python command-line shell
MIT License
176 stars 9 forks source link

TAB character in ls output #4

Closed terrycojones closed 4 years ago

terrycojones commented 4 years ago

I don't know why, but when I run ls alone on a line (in my daudin directory) a TAB is in the output. The ls runs in a pseudo-tty and it seems that a TAB really does come back from the master pty desciptor. So I must be doing something wrong somewhere. This doesn't apply when ls is piped into another command because in that case a pseudo-tty isn't used. The ls output prints just fine with the embedded TAB, but how did it get there? It's hard to figure out what's going on because you can't just pipe into something (like od -a) from the shell because then ls changes its behavior. Can it be that there really is a TAB in the ls output in a pseudotty?

terrycojones commented 4 years ago

OK, this makes sense after all. The TABs are just part of the whitespace separating file names that appear on the same line.