I've seen reports of other people having this issue, but for me it's only as the root user. Tab completion isn't working properly as displayed in the below gif. I first use sudo -sE to preserve the user environment for root. Then I use sudo -i and show an additional problem with directory completion. I do have ZSH set as the SHELL for my root user and I have /root/.zshrc symlinked to my user's .zshrc (/home/andrew/.zshrc).

Here is the entirety of my .zshrc file:
export ZSH=/home/andrew/.oh-my-zsh
ZSH_THEME="powerlevel9k/powerlevel9k"
source $ZSH/oh-my-zsh.sh
No customization at all. I've tried this with ZLE_RPROMPT_INDENT=0 in my .zshrc file and without. Same results.
I will say that I've noticed this issue seems to be with all powerline themes. I would LOVE it if you were able to nail down the issue as this is my _favorite_ zsh theme!
I had the same issue when customising the POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. Removed it and the problem disappear.
My current configuration is:
ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(time dir vcs)
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
POWERLEVEL9K_SHORTEN_STRATEGY="truncate_middle"
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
Hey @amlamarra! I'm so sorry it's taken me so long to respond to this! I'm trying to catch up on my P9k TODO list, now =)
Okay, so, that's a strange problem. Everytime we've seen that in the past it is affected by the ZLE_RPROMPT_INDENT variable.
I see you are using Konsole. Can you try a different terminal emulator and let me know if you see the same issue?
@jmetzz Thanks, but that didn't help.
@bhilburn Same issue with Yakuake, but I suppose that's essentially the same as Konsole. I just installed Terminator & did NOT have the issue.
I am using iTerm2 and also experiencing the same problem.
@amlamarra - Okay, really happy to hear you don't see the issue in something that's not Konsole. We'll have to add this to the list of issues with see with Konsole-based emulators, unfortunately.
@ddyjis - Your issue, on the other hand, is very strange. We have a ton of iTerm2 users, including myself, and we don't see this problem. I'll note that there was one version of iTerm2 where folks saw issues, though. What version are you running? Can you try updating and let us know if you still see problems?
i think you have trouble with the font
The problem here using Mac OS X and iTerm2 is when i add the battery to the 'POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS' array
(Which is quite odd since it works fine in the 'POWERLEVEL9K_LEFT_PROMPT_ELEMENTS'
Also found in #710
@supercid I have found that removing 'battery' from the right prompt elements fixes this problem as well.
@amlamarra @bhilburn
I have this issue in iTerm2 but only if the battery segment is in the right prompt and the battery icon is the default one versus the new staged option. See #710
I don't have the battery showing in mine at all.
FWIW I'm seeing the same thing with my setup - interestingly it only happens under tmux.
mac ➡️ ssh centos ➡️ zprezto/powerline ✅
mac ➡️ ssh centos ➡️ zprezto/powerline ➡️ sudo ✅
mac ➡️ ssh centos ➡️ zprezto/powerline ➡️ tmux ✅
mac ➡️ ssh centos ➡️ zprezto/powerline ➡️ tmux ➡️ sudo ❌
The information from @jshort, amlamarra, and @ahpook is really helpful. Thanks for pitching in, everyone! The common denominator in all of this is the battery segment, so I think it's clear there's an issue in that code somewhere - this also aligns with what @jshort found in #710.
The battery segment is one of our more complicated code segments, mostly due to how configurable the battery levels are - the array of glyphs is fairly complex. It seems likely that some aspect of the indexing or substitution is injecting code that breaks the rest of the prompt.
Let's use @jshort's #710 to track the fix for this.
For me, it breaks if POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS contains root_indicator (so also with the standard config). When I remove root_indicator, it works like expected.
@therealfarfetchd I think that's causing the problem for me as well. Especially since I don't use the battery indicator.
@therealfarfetchd @amlamarra - Ah, interesting. Thanks so much for chiming in, here. We'll get this fixed.
@dritter @onaforeignshore - It would be worthwhile to test this in the #771 to see if it reproduces there. We might get lucky. Is there anything that would be helpful for @amlamarra and @therealfarfetchd to try to help debug?
(Separately, @amlamarra, what did you use to record the GIF in the issue description?)
@bhilburn I think I used Peek (https://github.com/phw/peek)
I too had the same issue while using zsh 5.5.1 with iTerm2 3.1.6 on OSX 10.11.2, removing the beer icon from the left prompt did the magic for me.
I can confirm that disabling root_indicator from the POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS list is fixing the issue.
I can also confirm that I'm encountering this issue on a Debian GNU/Linux 9.4 (stretch) but It's still working fine on another Debian GNU/Linux 8.11 (jessie), if that helps.
I won't mind trying to help you debug this weird issue.
I don't think the problem is with powerlevel9k.
I've tried arrow and pure themes with the same result using zsh 5.5.1, but everything works perfectly with 5.4.2
Just figured it out, this helps https://github.com/sindresorhus/pure/issues/300#issuecomment-328744993
@iowelinux That did not fix it for me. Only disabling the root_indicator in the POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS variable fixes it for me. I have this line in my .zshrc:
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status background_jobs history time)
Is anyone still seeing this issue? If so, could you try the next branch and let us know if you still see it?
The next branch fixed this issue on Debian GNU/Linux 9.4 (stretch) / Mac OS X 10.14.1 (18B45d)
But I'm not seeing the root_indicator anymore...
@qkdreyer - Happy to hear that the next branch resolved this for you! It sounds like you may have found a different issue in the new code, though. Would you mind opening an issue for the broken root_indicator on next?
@iowelinux @vikas027 @amlamarra @therealfarfetchd @ahpook pook @supercid @landesko @jshort - I'm trying to determine if this issue has been resolved for everyone on the next branch. If you have a chance, can you switch over to next and let us know if it works for you? Thanks!
@bhilburn Yup, it's fixed in the next branch.
Thanks for confirming, @amlamarra! Closing this issue out =)
@qkdreyer - And thanks for the new bug report!
Sadly, since #1016 has been merged, this bug came back 😞

Wow, really?
Okay, @dritter, looks like we got some crazy ZSH parsing issue happening, here, since we're passing conditionals through string arguments. Agree / disagree?
It worth mentioning that I'm not experiencing this bug using Terminal.app on master/next branch, only using iTerm2.app.
My guess is there is something wrong with \u2714
Er, okay, getting more confused, hah. If you change your font, do you still see the issue?
I have this same error of duplicate character with tabbing, only as root. Without powerlevel9k. I then tried powerlevel9k with many different mono fonts, and exact same result.
On manjaro 17.1.11.
oh-my-zsh-git r4602.91b771914-1
zsh 5.6.2 (x86_64-pc-linux-gnu).
As of 10/28/18, system is fully updated to:
OS: Manjaro 18.0.0-rc Illyria
Kernel: x86_64 Linux 4.18.16-1-MANJARO
I tried 10 different fonts (Inconsolata-g, Consolas, mono, etc).
@Rairden - So it sounds like @qkdreyer saw different results with different emulators. What terminal emulator are you using, and if you try a different one, do you still see the problem?
@qkdreyer - I'm really not sure what to think, here... it would be __REALLY__ strange if a single code-point broke emulators. It sounds like we are hitting some edge case somehow in some emulators, but I'm not sure what might be triggering it. To sanity check this, can you change your root indicator icon to pretty much anything else? If that actually changes something, my head might implode.
@bhilburn Using Meslo LG L DZ Regular for Powerline 12pt
iTerm.app using NODE_ICON as ROOT_ICON
iTerm.app using real ROOT_ICON
Terminal.app using real ROOT_ICON
Also tried with Source Code Pro on iTerm.app :
iTerm.app using real ROOT_ICON
Er, wait, so did that work correctly in bullets #1 and #3, above?
Using Terminal.app is working in all cases, and not using \u26A1 as ROOT_ICON is working in iTerm.app yeah...
@bhilburn, I forgot to add that I use konsole emulator.
I did all my testing over the summer, and I do want to say that when I tried a different emulator it fixed the issue. I remember trying terminology and I think it was terminator (or one of the common ones). I didn't like those emulators because you couldn't use your own gradient background image.
Thanks for confirming, @qkdreyer @Rairden. This does sound like differences in emulator behavior, and based on the discussion above, I don't think there is anything we can do in P9k, here. Especially since different fonts will use a different codepoint for that icon, even trying to conditionalize it would be a nightmare.
I'm going to close this one out because I don't think there is anything we can do. If anyone disagrees or wants to discuss this further, please re-open!
I have encountered the same problem on iTerm, and I've solved it.
The reason for the problem is ROOT_ICON, the emoji widths problem.
To solve it, just check Use Unicode version 9 widths in Preferences > Profiles > Text

Thanks a lot !!
Most helpful comment
I have encountered the same problem on

iTerm, and I've solved it.The reason for the problem is ROOT_ICON, the emoji widths problem.
To solve it, just check
Use Unicode version 9 widthsinPreferences > Profiles > Text