made prompt colored
This commit is contained in:
parent
a59d812f24
commit
d1f16360e5
6
demo.sh
6
demo.sh
@ -3,6 +3,10 @@
|
|||||||
TYPE_SPEED="${TYPE_SPEED:-15}"
|
TYPE_SPEED="${TYPE_SPEED:-15}"
|
||||||
PROMPT_TIMEOUT="${PROMPT_TIMEOUT:--1}"
|
PROMPT_TIMEOUT="${PROMPT_TIMEOUT:--1}"
|
||||||
|
|
||||||
|
def="\033[0;00m"
|
||||||
|
blu="\033[0;34m"
|
||||||
|
cyn="\033[0;36m"
|
||||||
|
|
||||||
function simtyping()
|
function simtyping()
|
||||||
{ pv -qL $(($TYPE_SPEED+$((-2 + RANDOM%5)))); }
|
{ pv -qL $(($TYPE_SPEED+$((-2 + RANDOM%5)))); }
|
||||||
|
|
||||||
@ -21,7 +25,7 @@ function type()
|
|||||||
|
|
||||||
function execute()
|
function execute()
|
||||||
{
|
{
|
||||||
printf "$(whoami)@$(hostname)\$ "
|
printf "$cyn$(whoami)$def@$blu$(hostname)$def\$ "
|
||||||
type "$@" && wait
|
type "$@" && wait
|
||||||
eval "$@"
|
eval "$@"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user