3 # Present a list of shell commands by single-stepping and echoing commands.
4 # Note that this only works well for self-contained single lines, no multi-line
7 # (c) 2009 Martin Pitt <martin@piware.de>
8 # License: Public Domain
28 if [ "x$1" = 'x--dark' ]; then
35 echo "Usage: $0 [--dark] <shell script>" >&2
40 echo -en "\e[${PROMPT}m\$\e[${CMD}m "
43 # paragraph clears screen
44 if [ -z "$line" ]; then
46 echo -en "\e[${PROMPT}m\$\e[${CMD}m "
51 if [ "${line:0:1}" = "#" ]; then
52 if [ -n "${line:1}" ]; then
53 echo -e "\r\e[${COMMENT}m$line\e[${CMD}m"
54 echo -en "\e[${PROMPT}m\$\e[${CMD}m "
62 echo -ne "\e[${OUTPUT}m"
64 echo -en "\n\e[${PROMPT}m\$\e[${CMD}m "