Hello guys,
If I remember correctly in the past I have watched a video of Jay which do Pop!_OS overview (but I could be wrong) on this tutorial I seen in a terminal fancy Linux shell (PS1) which consist of two rows, full directory path, date and seconds, probably git integration and so on. I also remember that I have checked the project in the GitHub and it looks promising and very widely used.
Unfortunately I can’t find the right article now.
Can you help me with that?
Thanks.
Jay’s prompt can be found in his Ansible configs on Github (complete with a nice Unicorn):
A little explanation to the default variables can be found here.
\t The time, in 24-hour HH:MM:SS format.
\j The number of jobs currently managed by the shell.
\h The hostname, up to the first . (e.g. deckard)
\w The current working directory.
\n A newline.
The tput commands sets colors using this commands instead of bash color codes.
In addition, you can construct your own if structure to show Git information (if inside a Git tree), like this:
$(if [[ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" ]]; then echo -n "[$(git branch --show-current)]$(git rev-list HEAD --count):♮]"; fi)
This means I always know who owns the directory, and also if I do file operations (copy, move, delete etc.), I get instant notification that it succeeds, since the count numbers change.