blob: ee77770c95a3db892074e700017d1fc79bc3ae2f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/bash
# make sure window title is set in terminals
SET_TERM_TITLE='\[\033]0;\u@\h:\w\007\]'
if [ "$1" == "err" ]; then
color="\[$(tput setaf 1)\]" # red
else
color="\[$(tput setaf 10)\]"
fi
RESET="\[$(tput sgr0)\]"
# count jobs
JOBS='`[ \j -gt 0 ] && printf " (\j)"`'
echo "${SET_TERM_TITLE}${color}\w${RESET}${JOBS} ❱ "
|