Possibility of coloring files based on git status? #242
Replies: 1 comment 3 replies
-
For the time being clifm provides only external git-integration (see the git-integration section). What this plugin does is pretty simple: it runs a git command (which can be customized to your liking by just editing the script) with each new prompt, so that you can keep track of your git repos. To perform file colorization (and other stuff) based on the git status we need full, internal integration via the libgit2 C library and new code added to our files listing routines. Doable? Totally, but it implies a new dependency and more computation for each listed file (which of course results in slower listing times). However, this feature has been in my TODO list for quite a while: it's definitely not a bad idea. |
Beta Was this translation helpful? Give feedback.
-
Still learning about this tool and its features, but I just wanted to get the idea out there. Apologies if there's already a feature for this.
I spend more time in directories that are repositories than aren't, and I call
git status
very frequently to ensure that the desired changes are staged. I'm thinking that color coding, or adding some sort of special character, would be very helpful for my workflow. A color for a file with staged changes, unstaged changes, a new unstaged file, a new staged file, etc.You can get a format that can be easily parsed with
git status -z --porcelain
, which will return a list of staged and unstaged file statuses separated by NULL characters ("\0"
).Beta Was this translation helpful? Give feedback.
All reactions