sparseline
is a low resource alternative to the powerline options out there. What this means is that it only makes subtle augmentations to your prompt with a focus on git repos. Since sparseline
does not invoke git, it's limited by the contents of the .git
directory.
- this is prefixed to PS1:
« remote/branch#truncated_hash »
- The "truncated_hash" is replaced with local tag when applicable.
- Pure
bash
, does not invokegit
.
« origin/master#77f6ff4 »
prepends.
How it looks on my machine:
● origin/master#345f2dbramos@saturn ~/Documents/Development/sparse-lie
Simply source the file from the appropriate bash config file:
source /path/to/sparseline
Please note that sparse-line
is meant to affect your PS1 only when within a git repository.
- What about defining vars?
- switch for turning off color
- switch for no-special symbols
- osse@freenode#git: I think it might be a bit naïve. For example the file refs/heads/somebranch doesn't necessarily exist even when the branch does
- lupine@freenode#git: some refs are stored in
.git/packed-refs
and so greppingrefs/*
is not enough; Not sure actually, it makes sense that local branches aren't packed that way - ikke git gc will pack local branches