{"action":"created","issue":{"url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/6985","repository_url":"https://api.github.com/repos/robbyrussell/oh-my-zsh","labels_url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/6985/labels{/name}","comments_url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/6985/comments","events_url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/6985/events","html_url":"https://github.com/robbyrussell/oh-my-zsh/issues/6985","id":340343883,"node_id":"MDU6SXNzdWUzNDAzNDM4ODM=","number":6985,"title":"shell bugged with 'ghost' characters","user":{"login":"garyAtSegment","id":39279134,"node_id":"MDQ6VXNlcjM5Mjc5MTM0","avatar_url":"https://avatars0.githubusercontent.com/u/39279134?v=4","gravatar_id":"","url":"https://api.github.com/users/garyAtSegment","html_url":"https://github.com/garyAtSegment","followers_url":"https://api.github.com/users/garyAtSegment/followers","following_url":"https://api.github.com/users/garyAtSegment/following{/other_user}","gists_url":"https://api.github.com/users/garyAtSegment/gists{/gist_id}","starred_url":"https://api.github.com/users/garyAtSegment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garyAtSegment/subscriptions","organizations_url":"https://api.github.com/users/garyAtSegment/orgs","repos_url":"https://api.github.com/users/garyAtSegment/repos","events_url":"https://api.github.com/users/garyAtSegment/events{/privacy}","received_events_url":"https://api.github.com/users/garyAtSegment/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-07-11T17:50:43Z","updated_at":"2018-08-10T11:29:02Z","closed_at":null,"author_association":"NONE","body":"Original issue filed here: https://stackoverflow.com/questions/51291531/zsh-command-prompt-has-ghost-characters-when-scrolling-through-history\r\n\r\nI'm not sure if this is a bad config in my environment (Although I have disabled all the evals in my .zshrc)\r\n\r\nWhen I first install oh-my-zsh everything works fine, after running for awhile I end up with the situation where my command prompt ends up with a bugged prompt:\r\n\r\nAssume that the first command is in history and I up-arrow to it.\r\n\r\n    ➜  ~ some-command some-fairly-long-command --with-a-bunch --of-switches\r\n\r\nWhen I down-arrow I expect to see \r\n\r\n    ➜  ~ \r\n\r\nBut what I do see:\r\n\r\n    ➜  ~ so\r\n\r\nIf I try to type there:\r\n\r\n    ➜  ~ so[new text is inserted after those two characters]\r\n\r\nThe additional characters are ignored by the shell and I can't backspace over them.  If I hit enter their ignored etc, but it's not just the first two characters, my whole prompt is bugged at that point.  If I make changes to a history command and try to re-execute what I see on the screen isn't what's executed (IE there's some overwriting going on in the buffer that's not apparent).\r\n\r\nI'm not sure if this is zsh specific as I've seen this reported: https://unix.stackexchange.com/questions/28827/why-is-my-bash-prompt-getting-bugged-when-i-browse-the-history with bash.\r\n\r\nI've scraped out most of the weird stuff in my .zshrc (autocomplete etc) but I still see this.  I have recently re-installed oh-my-zsh and the issue went away for awhile but recently re-occurred."},"comment":{"url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/comments/412055789","html_url":"https://github.com/robbyrussell/oh-my-zsh/issues/6985#issuecomment-412055789","issue_url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/6985","id":412055789,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjA1NTc4OQ==","user":{"login":"egoisticalgoat","id":18332886,"node_id":"MDQ6VXNlcjE4MzMyODg2","avatar_url":"https://avatars3.githubusercontent.com/u/18332886?v=4","gravatar_id":"","url":"https://api.github.com/users/egoisticalgoat","html_url":"https://github.com/egoisticalgoat","followers_url":"https://api.github.com/users/egoisticalgoat/followers","following_url":"https://api.github.com/users/egoisticalgoat/following{/other_user}","gists_url":"https://api.github.com/users/egoisticalgoat/gists{/gist_id}","starred_url":"https://api.github.com/users/egoisticalgoat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egoisticalgoat/subscriptions","organizations_url":"https://api.github.com/users/egoisticalgoat/orgs","repos_url":"https://api.github.com/users/egoisticalgoat/repos","events_url":"https://api.github.com/users/egoisticalgoat/events{/privacy}","received_events_url":"https://api.github.com/users/egoisticalgoat/received_events","type":"User","site_admin":false},"created_at":"2018-08-10T11:29:02Z","updated_at":"2018-08-10T11:29:02Z","author_association":"NONE","body":"I've tried around a bunch, and found a workaround/possible reason for the problem.\r\nI've added the line `export LC_ALL=en_US.UTF-8` to my .zshrc, because i had some encoding problems in another application. Suddenly, the ghost characters stopped happening. I've tried around a bit more, and found that in my case the exact LC_* variable that was causing the problem was LC_CTYPE being set to C (but i suppose it probably happens with all non-UTF8 locales) \r\n\r\n@ the previous commentors: Check `locale` on your terminal and see what your LC_ALL and your LC_CTYPE variables are set to. "}}
{"actor":{"display_login":"egoisticalgoat"}}