Files
go-highlite/test_inputs/1.shell
T
2023-07-17 23:07:25 +01:00

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