You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
553 B
18 lines
553 B
2 years ago
|
#!/usr/bin/env sh
|
||
|
|
||
|
# A special version of say that prints the text in grey text, indented.
|
||
|
# Use this to show commands before they are executed, to teach those on the path of wizardry.
|
||
|
|
||
|
source ./say
|
||
|
source ./ask_Yn
|
||
|
|
||
|
wizard_eyes() {
|
||
|
if [ -z $WIZARD ]; then check_wizard; fi
|
||
|
if [ -n "$WIZARD" ] && [ "$WIZARD" -eq 1 ]; then say " ${GREY}${1}${RESET}"; fi
|
||
|
}
|
||
|
|
||
|
# Todo next: Add remember/recall functions so that wizard status is remembered after first ask
|
||
|
check_wizard() {
|
||
|
ask_Yn WIZARD "First, let me ask, are you a wizard?"
|
||
|
export "WIZARD=$WIZARD"
|
||
|
}
|