Powerlevel9k / powerlevel9k

Powerlevel9k was a tool for building a beautiful and highly functional CLI, customized for you. P9k had a substantial impact on CLI UX, and its legacy is now continued by P10k.
https://github.com/romkatv/powerlevel10k
MIT License
13.46k stars 947 forks source link

Displaying of root directory with DIR_PATH_SEPARATOR on #1041

Open deathtrip opened 6 years ago

deathtrip commented 6 years ago

So i use DIR_PATH_SEPARATOR, but i still want the leading slash for the root directory, instead of the icon. So i set POWERLEVEL9K_FOLDER_ICON='/' and here's the problems i encounter with it:

  1. When i'm in the root directory i get a double slash like this screenshot_20181017_022353 The solution here would be for DIR_PATH_SEPARATOR to always hide the leading slash, even when the user is in the root directory itself, as there's still an option to use the icon.
  2. When i'm not in the root directory, there's an extra space after the slash: screenshot_20181017_022427 The correct way would look like this: screenshot_20181017_022305

Meanwhile DIR_OMIT_FIRST_CHARACTER doesn't seem to do anything in this particular config, as i read in the documentation the leading slash gets removed anyway when using DIR_PATH_SEPARATOR. I think DIR_OMIT_FIRST_CHARACTER should be tweaked to apply even when DIR_PATH_SEPARATOR is used.

bhilburn commented 6 years ago

Thanks, @deathtrip!

Okay, it sounds like the second item could be fixed by moving the space from the code to the icon itself. Pretty simple.

For the first one, the proposed solution of moving the slash to the icon definition itself would work. It feels a little clunky to me, but I don't think it would actually impact other configurations. @dritter - thoughts on that?

noahjacknichols commented 5 years ago

is this still open?

romkatv commented 5 years ago

is this still open?

The issue is in status Open and p9k still behaves as described by the OP.

roshangrewal commented 5 years ago

It sounds like the 2nd item could be fixed by moving the space from the codes to the icon itself, pretty simple.