powerlevel9k icon indicating copy to clipboard operation
powerlevel9k copied to clipboard

dir module printing message "Please ask your administrator." at root level

Open azuretheseeker opened this issue 6 years ago • 6 comments

On new user installation on ubuntu 18.04, the dir module for the left prompt is displaying a message that says "Please ask your administrator." at the root folder level and squeezing out the actual dir information to be irrelevant.

PL9KBug

The issue goes away (along with any dir information) when the dir module is taking out of the left prompt:

Issue Persists With This: POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(root_indicator context dir_writable dir anaconda vcs)

No Issue With This: POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(root_indicator context dir_writable anaconda vcs)

Environment Information

zsh 5.4.2 (x86_64-ubuntu-linux-gnu) Oh-My-ZSH Installed by cloning the repo from latest github xfce4-terminal

azuretheseeker avatar Jun 24 '19 13:06 azuretheseeker

That's an intriguing message. What's the output of echo $POWERLEVEL9K_SHORTEN_STRATEGY ?

romkatv avatar Jun 24 '19 13:06 romkatv

echo $POWERLEVEL9K_SHORTEN_STRATEGY

truncate_with_package_name

azuretheseeker avatar Jun 24 '19 13:06 azuretheseeker

It's possible that the prompt recommends to chat up your system administrator to install jq. Unfortunately, installing jq won't fix your prompt because there is another bug in truncate_with_package_name: https://github.com/bhilburn/powerlevel9k/issues/1296. It works in powerlevel10k though.

romkatv avatar Jun 24 '19 14:06 romkatv

The issue is definitely with a command that the dir module is running that isn't installed or accessible or in the path for the user. To clarify:

  1. All modules for default user on the ubuntu system works
  2. For the newly created user, with a fresh install of oh-my-zsh, powerlevel9K and latest zsh package from ubuntu, we get the error.

I have admin access and installed jq but that didn't resolve the issue. I have the zsh-better-npm-completion plugin for zsh, which for any binary that's not found gives a message similar to what's displayed on the prompt. As an example, this is an attempt (unrelated binary):

> qube
WARNING:root:could not open file '/etc/apt/sources.list.d/signal-xenial.list'


Command 'qube' not found, but can be installed with:

apt install avogadro
Please ask your administrator.

What are other dependencies for dir module that I can check besides jq?

azuretheseeker avatar Jun 24 '19 15:06 azuretheseeker

Dunno. It could be many things. If you can reproduce it with powerlevel10k, I'll debug it.

romkatv avatar Jun 24 '19 15:06 romkatv

Thanks Romka. Will take a look at powerlevel10K, looks like a promising project. Just want to go one step at a time in updates, so it would be great to make this work with 9K, if anybody else has an idea about what may be missing?

azuretheseeker avatar Jun 24 '19 15:06 azuretheseeker