about summary refs log tree commit diff stats
path: root/config/ksh/prompt.ksh
diff options
context:
space:
mode:
Diffstat (limited to 'config/ksh/prompt.ksh')
-rw-r--r--config/ksh/prompt.ksh20
1 files changed, 20 insertions, 0 deletions
diff --git a/config/ksh/prompt.ksh b/config/ksh/prompt.ksh
new file mode 100644
index 0000000..e5dfaf5
--- /dev/null
+++ b/config/ksh/prompt.ksh
@@ -0,0 +1,20 @@
+#!/bin/ksh
+SEP=""
+RSEP=""
+#_PS1='\[\033[';
+#_END='m\]';
+#_CLEAR=0;	_FG_BLACK=30;	_BG_BLACK=40
+#_BRIGHT=1;	_FG_RED=31;	_BG_RED=41
+#_DIM=2;	_FG_GREEN=32;	_BG_GREEN=42
+#_UNDER=4;	_FG_YELLOW=33;	_BG_YELLOW=43
+#_BLINK=5;	_FG_BLUE=34;	_BG_BLUE=44
+#_REVERSE=7;	_FG_MAGENTA=35;	_BG_MAGENTA=45
+#_HIDDEN=8;	_FG_CYAN=36;	_BG_CYAN=46
+#		_FG_WHITE=37;	_BG_WHITE=47
+vcs() {
+	if git status >/dev/null 2>&1; then
+		_GIT_BRANCH="$(git branch|grep -F '*'|sed 's/* //')"
+		printf '  %s\n' "$_GIT_BRANCH"
+	fi
+}
+PS1='\[\033[7;32m\]$?\[\033[0;32;45m\]$SEP\[\033[0;7;35m\]\A$RSEP\[\033[0;1;31m\]\u\[\033[0;32m\]@\[\033[1;34m\]\h\[\033[7;36m\]$SEP\[\033[7m\]\w$RSEP\[\033[0;32m\]$(vcs)\n\[\033[0;32m\]\$\[\033[0m\] '