mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-08-28 04:46:30 -04:00
16 lines
332 B
Bash
16 lines
332 B
Bash
#!/bin/sh
|
|
prompt ()
|
|
{
|
|
FCM=$(fc -ln -0)
|
|
CM=$(echo "$FCM"|awk -F " " '{print $1}')
|
|
if ls /etc/supercat/spcrc-"$CM"* > /dev/null 2>&1; then
|
|
echo "Rerun with colour [y/n]?"
|
|
read -r YN
|
|
if [ "$YN" = 'y' ] || [ "$YN" = 'Y' ] ;then
|
|
eval "$FCM"| spc -c /etc/supercat/spcrc-"$CM"*
|
|
fi
|
|
fi
|
|
}
|
|
|
|
export PROMPT_COMMAND=prompt
|