Closed VenkatRamaraju closed 3 years ago
What kind of examples do you think would be useful? Deleting a bunch of lines (as I understand you’ve done in your own config) can likely be done as easily without an example.
It was straightforward, I just thought an explicit example would make it much clearer. Something along the lines of:
For example, if you do not want the count of various symbols in git status to show in your prompt, you can comment out this section of the source code.
# (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}"
# !42 if have unstaged changes.
# (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}"
# ?42 if have untracked files. It's really a question mark, your font isn't broken.
# See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon.
# Remove the next line if you don't want to see untracked files at all.
# (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}"
# "─" if the number of unstaged files is unknown. This can happen due to
# POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower
# than the number of files in the Git index, or due to bash.showDirtyState being set to false
# in the repository config. The number of staged and untracked files may also be unknown
# in this case.
And then perhaps the before and after pictures of the prompt.
I'm not sure this example would be valuable enough to justify its size. Several reasons:
Fair points, I'll close the issue.
Thank you!
The README currently says to edit the source code directly to change the formatting of git status. Do you think it would be good to have an example there?
For me, I did not want to see any numbers in the prompt for a git repo folder. By default, the prompt will display the count of tracked/untracked files, and other things in this list. I had to comment out a section of code in the
my_git_formatter
function of the~/.p10k.zsh
file to remove these numbers from the prompt.I'd be willing to open a PR on the README (or wherever you think is best) with the example of what I did, I think it could be of some help. If you don't think it's worth it, feel free to close the issue.