justjanne / powerline-go

A beautiful and useful low-latency prompt for your shell, written in go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'repo_mode' for the cwd segment that shows the cwd starting at the repo root

prasant94 opened this issue · comments

Is your feature request related to a problem? Please describe.
99% of the time I am in a folder that is under my code folder in the home dir. So (assuming --cwd-max-depth 3) the cwd segment always looks like code > ... > curr_dir. The only useful information here is the last piece of the segment.

Describe the solution you'd like
We could create a repo_mode for the cwd segment so that when inside a git repo, the segment reports the cwd rooted at the git repo instead of starting for ~.

For example, if the powerline-go repo is cloned ~/code/go/src/github.com/jusjanne/powerline-go and I cd into powerline-go/themes, with repo_mode the cwd segment shows powerline-go > themes instead of code > ... > themes.