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] dir: Optionally fallback to repo name with `truncate_to_package_name` #1156

Open wrboyce opened 5 years ago

wrboyce commented 5 years ago

Adds three new settings: P9K_DIR_SHORTEN_GIT_FALLBACK, P9K_DIR_SHORTEN_GIT_FALLBACK_USE_REMOTE, and P9K_DIR_SHORTEN_GIT_FALLBACK_REMOTE_NAME for the truncate_to_package_name path shortening strategy.

If GIT_FALLBACK is non-zero and a package.json/composer.json does not exist then the repo directory name will be used as the "root" directory in the prompt path label. If USE_REMOTE is non-zero, then the remote of name REMOTE_NAME (defaulting to "origin") will be used in-place of the local dir name.