summaryrefslogtreecommitdiff
path: root/config/p10k-lean.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-03-09 19:38:52 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-03-09 19:38:52 +0300
commitdb1e12bce3fdb82e38d4d9ef72b8c2a6df0d8708 (patch)
tree1c2f3153109d5b70e205cacfd02383a42dbd9bc4 /config/p10k-lean.zsh
parent95008fc87195bf657903ad27d41c06718521a80d (diff)
add `package` prompt segment
Diffstat (limited to 'config/p10k-lean.zsh')
-rw-r--r--config/p10k-lean.zsh13
1 files changed, 13 insertions, 0 deletions
diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh
index dde6fcdd..408537c6 100644
--- a/config/p10k-lean.zsh
+++ b/config/p10k-lean.zsh
@@ -65,6 +65,7 @@
# php_version # php version (https://www.php.net/)
# laravel_version # laravel php framework version (https://laravel.com/)
# java_version # java version (https://www.java.com/)
+ # package # name@version from package.json (https://docs.npmjs.com/files/package.json)
rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv)
rvm # ruby version from rvm (https://rvm.io)
fvm # flutter version management (https://github.com/leoafarias/fvm)
@@ -985,6 +986,18 @@
# Custom icon.
# typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]####
+ # Package color.
+ typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117
+ # Package format. The following parameters are available within the expansion.
+ #
+ # - P9K_PACKAGE_NAME The value of `name` field in package.json.
+ # - P9K_PACKAGE_VERSION The value of `version` field in package.json.
+ #
+ # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}'
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
#############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]##############
# Rbenv color.
typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168