diff options
Diffstat (limited to '.local')
| -rwxr-xr-x | .local/bin/prompt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.local/bin/prompt b/.local/bin/prompt new file mode 100755 index 0000000..90e3a17 --- /dev/null +++ b/.local/bin/prompt @@ -0,0 +1,8 @@ +#!/bin/sh +BRANCH=$(git branch --show-current 2>/dev/null) +BRANCH=$(test -d .git && test -n $BRANCH && echo "($BRANCH)") +PROMPT="[$(hostname):$(basename "$PWD")$BRANCH]" +case $(id -u) in +0) echo "$PROMPT# " ;; +*) echo "$PROMPT$ " ;; +esac |
