Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Allow prompt segments to be disabled through configuration options #205

Closed
romkatv opened this issue Sep 7, 2019 · 1 comment

Comments

@romkatv
Copy link
Owner

romkatv commented Sep 7, 2019

See Powerlevel9k/powerlevel9k#1252 and Powerlevel9k/powerlevel9k#1359 by @grzesuav.

@romkatv romkatv closed this as completed in 9a8a6ca Sep 7, 2019
@romkatv
Copy link
Owner Author

romkatv commented Sep 7, 2019

This is done.

Prompt segment foo doesn't get evaluated or shown on the left if ${POWERLEVEL9K_FOO_LEFT_DISABLED-$POWERLEVEL9K_FOO_DISABLED} is equal to true.

Example:

POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(dir)
  • By default dir is shown on the left and on the right.
  • POWERLEVEL9K_DIR_LEFT_DISABLED=true disables dir on the left.
  • POWERLEVEL9K_DIR_RIGHT_DISABLED=true disables dir on the right.
  • POWERLEVEL9K_DIR_DISABLED=true disables dir everywhere.

Note that it's possible to hide segments without disabling their evaluation through expansions. For example:

POWERLEVEL9K_DIR_CONTENT_EXPANSION='${HIDE_DIR-$P9K_CONTENT}'
POWERLEVEL9K_DIR_VISUAL_IDENTIFIER_EXPANSION='${HIDE_DIR-$P9K_VISUAL_IDENTIFIER}'

With these settings, HIDE_DIR='' hides dir while unset HIDE_DIR restores it.

romkatv added a commit that referenced this issue May 30, 2021
113f1f69 release gitstatusd-linux-x86_64 v1.5.0
e193be52 expose HEAD's commit message
815301f1 do not redefine `exec` and `builtin` in bash bindings (#235)
97c2aa17 Make `--version-glob` to receive an argument (#216)
95e549fd Support building on OpenBSD (#208)
b054ddf2 make homebrew instructions work on systems other than darwin-x86_64 (#205)
98f99ade fix brew formula check

git-subtree-dir: gitstatus
git-subtree-split: 113f1f698667d12906d97e3818aec5d760dc6e3d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant