paxtonhare / demo-magic

A handy shell script that enables you to write repeatable demos in a bash environment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Keep default prompt

dkirrane opened this issue · comments

Is there a way to keep my default prompt between each step?

I've tried the following in my script but it results in now prompt at all:

. ~/demo-magic.sh
DEMO_PROMPT="${PS1}"
pe "ls -l"
pe "echo 'Hello'"

I have the same problem

Looks like $PS1 isn't available inside child scripts. I'd recommend setting DEMO_PROMPT to the actual value of your PS1.

So do an echo $PS1 in your terminal. then hand jam that value into your script.