Skip to content

Commit

Permalink
Add a basic example in README instead of the asciinema
Browse files Browse the repository at this point in the history
  • Loading branch information
jesselang committed Jan 7, 2018
1 parent 0b4c4df commit 348bbaf
Showing 1 changed file with 33 additions and 4 deletions.
37 changes: 33 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,38 @@ SIGINT (`Ctrl-C`) works as you'd expect, and SIGQUIT (`Ctrl-\`) will
"shell out" at any point during the scripted demo for those impromptu live
tweaks.

Check out the [example](example.sh) along with the asciinema:
[![asciicast](https://asciinema.org/a/121689.png)](https://asciinema.org/a/121689)
## Basic example

---
```bash
#!/bin/bash

[![asciicast](https://asciinema.org/a/121688.png)](https://asciinema.org/a/121688)
source path/to/demo.sh

c 'Write things here that you want to appear "typed" as comments.'
c Remember to double-quote lines that include double or single quotes.
c "You'll be sad if you forget. Space out this wall of text with an 'x'."
x

# NOTE: this comment won't appear in your demo

c 'Using x with a command will appear to "type" the command, then execute it'
c What time is it?
x date
c "It's time for lunch!"
x

c "Let's sleep 2 seconds, and clear the screen"
sleep 2
clear

c 'You can choose good points in the demo to "hold" moving on to finish'
c explaining, or answer questions. Pressing any key will continue.
hold

c You can also plan to go into a live shell during the demo.
c Exit the shell to continue the scripted demo.
shell

x
c "Now you've seen the basic use of demo.sh. Thanks for checking it out!"
```

0 comments on commit 348bbaf

Please sign in to comment.