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.47k stars 947 forks source link

[Enhancement] adds ...PROJECT_ONLY option to node_version.p9k #1219

Open ChrisBaker97 opened 5 years ago

ChrisBaker97 commented 5 years ago

This is a port of @weilbith's #760, updated for the v0.7.0+ branch, with docs and tests added. It works identically to his description in the previous PR, and is described in README.md.

tl;dr: A new environment variable P9K_NODE_VERSION_PROJECT_ONLY defaults to false. When set to true, it will mute the node_version segment unless a package.json file is located in a search of the current directory or one of its ancestors, prior to reaching /.