powerline-shell
powerline-shell copied to clipboard
Add option to require package.json for node_version segment
I added some features to the node_version segment to make it more configurable and fit my needs better.
Configuration Variables
If "requires_package" is set to true, then the segment will not add the segment if it does not find a "package.json" file in the path to the root.
I also added "chars" which is the number of characters of the output of node --version
to display.
Example Configuration:
{
"segments": [
"node_version"
],
"node_version": {
"require_package": true,
"chars": 3
}
}
Default
With "chars": 3
Note: these screenshots are before I made a change to add a space at the end of the segment.