Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: display short path in omg_second_line #129

Open
rebelot opened this issue Mar 17, 2018 · 0 comments
Open

question: display short path in omg_second_line #129

rebelot opened this issue Mar 17, 2018 · 0 comments

Comments

@rebelot
Copy link

rebelot commented Mar 17, 2018

Hi, I've currently set up $omg_second_line as follows to display the path relative to project root in $PS1. It works, so far so good, but I feel like it's "a bit" convoluted... is there any simpler way to implement this?

omg_second_line='\[\033[36m\]$(git rev-parse --show-toplevel | sed "s/^.*\/\(.*\)$/\1/")/$(git rev-parse --show-prefix)\[\033[m\]$ '

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant