3 ms·
The display weirdness (e.g. the Z shell's percent character showing up) that you are seeing in your demo is because you are putting the terminal line discipline
by JdeBP 1y ago
The display weirdness (e.g. the Z shell's percent character showing up) that you are seeing in your demo is because you are putting the terminal line discipline into raw mode, raw mode of course does not do CR-before-LF stuffing, and there's some confusion in the code as to when it does and when it does not explicitly emit CRs.
* https://github.com/bmf-san/ggc/blob/9e93ef8a87973cab916e37a9f45e0fae33b459e7/cmd/interactive.go#L71 https://github.com/bmf-san/ggc/blob/9e93ef8a87973cab916e37a9...
* https://github.com/bmf-san/ggc/blob/9e93ef8a87973cab916e37a9f45e0fae33b459e7/cmd/interactive.go#L134 https://github.com/bmf-san/ggc/blob/9e93ef8a87973cab916e37a9...
- johnisgood 1y agoWhere is the "%" showing up? I only see it before he runs ggc. It is common to use "%" instead of "$" in some shells. In particular, C Shell (csh) and Tcsh uses "%" as the prompt character. Common in BSD systems. Of course you can customize Zsh (or Bash) to show "%", too. Edit: never mind, I noticed it when he quit "ggc". My bad. :)
- bmf-san 1y agoAh, I hadn't noticed that — makes sense now that you point it out. I'll look into fixing it properly. Thanks a lot for the heads-up!
- johnisgood 1y agoCheck the parent of my comment, he was the one who found it. He offered more insight as well. He pointed out where the issue might be, and how to fix it.