-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always displays escape characters #271
Comments
Thank you for reporting this. What is the content of the |
PAGER=/usr/bin/less |
Can you please try to set |
Wow that did the trick! How can the full path be causing this? |
Thank you for checking. This is partly Lines 29 to 37 in 9316f2a
If we detect |
Gotcha! Thanks for the quick fix. |
Fix released in v0.7.0. |
The fix is not able to detect something like |
No. If you decide to pass your own arguments to |
Currently running v0.9.0 and still had the same problem. I have |
@TomLavenziano I think a recent change in |
Whenever I'm trying to bat a file, I always get an output like this
ESC[38;5;238m───────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────ESC[0m ESC[38;5;238m│ ESC[0mFile: ESC[1mREADME.mdESC[0m ESC[38;5;238m───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────ESC[0m ESC[38;5;238m 1ESC[0m ESC[38;5;238m│ESC[0m ESC[38;2;253;151;31m#ESC[0mESC[38;2;253;151;31m ESC[0mESC[38;2;253;151;31mparallel-sshESC[0m ESC[38;5;238m 2ESC[0m ESC[38;5;238m│ESC[0m ESC[38;5;238m 3ESC[0m ESC[38;5;238m│ESC[0m ESC[38;2;255;255;255mThis is an attempt to reboot pssh. ESC[0m ESC[38;5;238m 4ESC[0m ESC[38;5;238m│ESC[0m ESC[38;5;238m 5ESC[0m ESC[38;5;238m│ESC[0m ESC[38;2;253;151;31m##ESC[0mESC[38;2;253;151;31m ESC[0mESC[38;2;253;151;31mGoalsESC[0m ESC[38;5;238m 6ESC[0m ESC[38;5;238m│ESC[0m ESC[38;5;238m 7ESC[0m ESC[38;5;238m│ESC[0m ESC[38;2;119;119;119m*ESC[0mESC[38;2;255;255;255m ESC[0mESC[38;2;255;255;255mCleaner code, where possibleESC[0m ESC[38;5;238m 8ESC[0m ESC[38;5;238m│ESC[0m ESC[38;2;119;119;119m*ESC[0mESC[38;2;255;255;255m Incorporate many of the patches and fix many of the issues found atESC[0m ESC[38;5;238m 9ESC[0m ESC[38;5;238m│ESC[0m ESC[38;2;255;255;255m ESC[0mESC[4;38;2;166;226;46mhttps://github.saobby.my.eu.orgESC[0mESC[4;38;2;166;226;46m/lilydjwg/pssh/issuesESC[0m ESC[38;5;238m 10ESC[0m ESC[38;5;238m│ESC[0m ESC[38;2;119;119;119m*ESC[0mESC[38;2;255;255;255m Add a few features (-L/--list-hosts, for one)ESC[0m ESC[38;5;238m 11ESC[0m ESC[38;5;238m│ESC[0m ESC[38;5;238m 12ESC[0m ESC[38;5;238m│ESC[0m ESC[38;2;253;151;31m##ESC[0mESC[38;2;253;151;31m ESC[0mESC[38;2;253;151;31mOriginal README.mdESC[0m ESC[38;5;238m 13ESC[0m ESC[38;5;238m│ESC[0m ESC[38;2;255;255;255mPSSH provides parallel versions of OpenSSH and related tools, including pssh, pscp, prsync, pnuke and pslurp. This project includes psshlib which can be used within custom applications. The source code ESC[0m ESC[38;5;238m ESC[0m ESC[38;5;238m│ESC[0m ESC[38;2;255;255;255mis written in PythonESC[0m ESC[38;5;238m 14ESC[0m ESC[38;5;238m│ESC[0m ESC[38;5;238m 15ESC[0m ESC[38;5;238m│ESC[0m ESC[38;2;255;255;255mPSSH is supported on Python 2.5 and later (including Python 3.1 and later). It was originally written and maintained by Brent N. Chun. Due to his busy schedule, Brent handed over maintenance to Andrew MESC[0m ESC[38;5;238m ESC[0m ESC[38;5;238m│ESC[0m ESC[38;2;255;255;255mcNabb in October 2009.ESC[0m ESC[38;5;238m 16ESC[0m ESC[38;5;238m│ESC[0m ESC[38;5;238m 17ESC[0m ESC[38;5;238m│ESC[0m ESC[38;2;255;255;255mThis project originally located at ESC[0mESC[38;2;255;255;255m[ESC[0mESC[38;2;255;255;255mGoogle CodeESC[0mESC[38;2;255;255;255m]ESC[0mESC[38;2;255;255;255m(ESC[0mESC[4;38;2;166;226;46mhttps://code.google.com/p/parallel-ssh/ESC[0mESC[38;2;255;255;255m)ESC[0mESC[38;2;255;255;255m. Since Google Code has been closed, and has not appeared elsewhere, I (lilydjwg) have exported it to GitHub.ESC[0m ESC[38;5;238m───────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────ESC[0m
I searched around and found #98 which seems relevant, and it did lead me to thinking the culprit is less, so using --paging=never which seems to work. It seems that without it, bat always default to using less, even if the output is less than one screen, and for some reason that paging fails to display escape characters correctly.
However if I simply pipe the bat --paging=never output to less, then it displays fine paged, so I'm not sure what is causing this.
I'm using it on Fedora 27, using Gnome Terminal and bat 0.6.1 compiled with cargo.
The text was updated successfully, but these errors were encountered: