From f63bda2c1241858de214ca3ec1810c8672c775fd Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 30 Oct 2024 14:37:15 +0000 Subject: automatic import of git --- git-prompt.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 git-prompt.sh (limited to 'git-prompt.sh') diff --git a/git-prompt.sh b/git-prompt.sh new file mode 100644 index 0000000..c3741b1 --- /dev/null +++ b/git-prompt.sh @@ -0,0 +1,6 @@ +# Include the current git branch in the prompt + +if [ -f /usr/share/bash-completion/completions/git-prompt.sh ]; then + . /usr/share/bash-completion/completions/git-prompt.sh + PS1="$(echo -n "$PS1" | sed "s|\\\W\]|\\\W\$(type __git_ps1 >/dev/null 2>\&1 \&\& __git_ps1 \" (%s)\")\]|")" +fi -- cgit v1.2.3