When I run a command, the prompt gets a [ in front and, at the far right, a closing ] appears too (immediately, even if the command takes awhile to return).
This is better illustrated via screenshot: http://cl.ly/image/0z220C38052c. The current prompt with the cursor doesn't get the characters until I run something.
I just updated to OS X El Capitan this morning and I have zsh version zsh 5.0.8 (x86_64-apple-darwin15.0), not the Homebrew one. (Sounds like, looking through issues, maybe installing zsh from brew might work better overall.)
Interesting, I hadn't noticed since I run the homebrew one. I can indeed reproduce this running zsh 5.0.8 included with El Capitan but I'm quite baffled as to why. This was never a problem with any non-apple zsh 5.0.8.
Question is: is it a pure or an osx bug?
Actually this seems like it only happens in the OSX Terminal app (switched to iTerm in El Capitan). And it happens with both versions of zsh, brew and OSX.
It also happens if I switch prompts to a bundled Oh My Zsh theme.
Not a bug, it's an OSX Terminal feature. See here.
Nice find! Thanks, @mafredri. Great project here. :+1:
Lol, that's an annoying default. I was about to open an issue here too :p
Thanks for the pointer @mafredri :)
Just for completeness sake: This feature is actually pretty useful. I've written up a description of it here: http://apple.stackexchange.com/questions/209635/what-functionality-do-marks-offer-in-the-el-capitan-terminal
This is a very useful macOS terminal feature, like @nwinkler said. But the feature doesn't work if I am using Pure default two lines prompt :( It does if I am using a single line prompt (https://github.com/sindresorhus/pure/wiki#single-line-prompt) :)
@repoles Interesting, it used to work at one point. Not sure if it was broken by Mojave or if it's been that way ever since we switched to using zle reset-prompt. Unfortunately I don't think there's anything we can do to fix this. Apple Terminal probably just doesn't understand multi-line prompts (or is erased by the zsh prompt update).
I see. OK, I'll let you know if I figure out anything useful. Thanks!
Most helpful comment
Not a bug, it's an OSX Terminal feature. See here.