Make Git branch-name truncation configurable in the p10k configure wizard

Author: axel-winter-takktCreated Sep 29, 2026Updated Sep 29, 2026

Problem

The p10k configure wizard generates a custom my_git_formatter() function that truncates local Git branch names to 32 characters by default:

bash
(( $#branch > 32 )) && branch[13,-13]="…"

This behavior is not exposed as a Powerlevel10k configuration option. As a result, users who want to see the complete branch name may reasonably look for settings such as POWERLEVEL9K_SHORTEN_STRATEGY or a POWERLEVEL9K_VCS_* maximum-length option, but those settings do not affect the generated formatter. The only way to discover the solution is to inspect and manually edit the generated my_git_formatter() function.

For example, a branch such as bugfix/AB-24…-stuck-stale is displayed with an ellipsis even when the user has not explicitly requested branch-name truncation.

Suggested improvement

Please consider improving the wizard and/or generated configuration so that branch-name truncation is explicit and configurable. Possible approaches:

  • Ask in p10k configure whether Git branch names should be truncated.
  • Generate a clearly documented configuration variable for the maximum branch-name length or truncation strategy.
  • At minimum, make the generated comment more prominent and explain that removing the truncation line is required to display full branch names.

The existing generated comment says that deleting the line disables truncation, but this is easy to miss and the behavior is not discoverable through the wizard's questions or the documented POWERLEVEL9K_* options.

Expected behavior

The wizard should either let the user choose the branch-name truncation behavior or clearly identify the generated formatter as the place where this behavior is configured.