jimeh/git-aware-prompt

Value of PS1 variable not set and the three .sh files don't have +x

GroceryBoyJr opened this issue · 3 comments

When pulling the project, the git aware prompt doesn't work "out of the box". When I looked at the value of PS1, it wasn't getting assigned by the values from prompt.sh. Turns out PS1 wasn't being acted on by prompt.sh, so I uncommented the first PS1 example in the script comments at the bottom and it worked.

As a side note, the three .sh scripts don't have eXecute bits set.

They are also missing #!/bin/bash at the top, but they work OK without it.

jimeh commented

Right, yes out of the box it does nothing and instead leaves it up to the user to customize their prompt as they see fit. It simply provides tools for adding the git status to your prompt, rather than replace whatever your current prompt style is. The commented out PS1 examples are just that, examples for you to use if you want, or make your own.

Apologies if the instructions in the readme are not that clear about uneventful "out of the box" experience.

As for the script files, none of them actually need to be marked as executable or have a shebang, as they're not executed. They're sourced into a running bash instance.

I'll close this issue for now, but feel free to comment further if you have any more questions or feedback :)

jimeh commented

@GroceryBoyJr You're free to write any article you want about this project, or any of my projects really. And git-aware-prompt specifically is licensed under CC0 1.0 Universal, making public domain. So really you're free to do anything you like, without even asking for permission :)