No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE.txt
demo.gif
done.txt
humans.txt
readme.md
report.txt
sparseline
todo.txt

readme.md

What is?

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.

demo gif

features

  • this is prefixed to PS1: « remote/branch#short_hash »
  • The "short_hash" is replaced with local tag when applicable.
  • does not invoke, instead relying on bashisms

Example

« origin/master#77f6ff4 » • 19:02:57|ramos@Prometheus:[sparse-line]>

usage

Simple source the file from the appropriate bash config file:

source /path/to/sparseline

thoughts

  • What about defining vars?

do

  • switch for turning off color
  • switch for no-special symbols

critique

  • 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 grepping refs/* is not enough; Not sure actually, it makes sense that local branches aren't packed that way
  • ikke git gc will pack local branches