Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
During startup, title escape sequences were generated with printf in a subshell. Use the ANSI C string style to save time. Replace echo with printf when using the escapes in _lp_title(). Replace echo with here-string in _lp_as_text(). We can't change the API of _lp_title(), as it is the one function used in the default liquid.ps1. There are probably a sizable number of users using it. I had wanted to remove the title from PS1 for two reasons: First is that trying to read or debug your PS1 is much harder when there is a ton of extra junk in it. Second, the shell reprints PS1 if the terminal is redrawn, which can happen with ^L or on resize. But the second point is false; the terminal won't redraw PS1 unless it is waiting on the command line. I would only want the title to not be overridden when a command is running (since I want to make the title the running command in the future). And second, ^L to clear screen also only works when on the command line. I do want to remove the sed command that strips color escape codes. It is complicated, not portable, and is run for every prompt. We need to remove every such external call, so the best way is to not pass in colored text to the title. But the structure right now would make that difficult, so it stays for now.
- Loading branch information