Skip to content

question: display short path in omg_second_line #129

@rebelot

Description

@rebelot

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions