Closed jhamrick closed 10 years ago
hmm... I think @alexanderrich added these because the line length calculation in readline was messed up without them. However, it might need to check somehow what environment it is running in. This link seems to have a discussion about this.
The link Todd sent seems to sum it up. It's interesting that removing the escape sequences don't make a difference on OSX - when I run psiTurk without the escape sequences long commands wrap around and start overwriting the prompt.
Based on the link, it seems like the key is that the weird characters only occur for escape sequences that aren't read by readline, like the startup message. It looks like that holds true for @jhamrick since there aren't any symbols around the red "off". I'll push a change to when the escape symbols are used and see if that helps.
Ah, it is entirely possible that it actually does cause problems I didn't notice -- I didn't realize it would cause issues with stuff like wrapping, so I only just launched psiturk to see if the version formatting part was affected.
Anyway, I'll check out this commit next time I'm at a linux terminal and let you know how it goes.
Yep, seems to fix it for me! Thanks!
When I run psiTurk on my linux server, the color formatting seems to have issues:
I think it is because of the
\001
and\002
escape sequences in thecolorize
function inpsiturk_shell.py
; when I remove them, the weird unicode characters go away. These characters don't appear when I run psiTurk on OS X, and if I remove the escape sequences, it doesn't seem to matter either.