Skip to content

Commit

Permalink
docs(README): add command to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcur committed Jun 29, 2024
1 parent a5121c4 commit 12680d7
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,42 @@ These examples are generated by [./scripts/examples.sh](scripts/examples.sh).
Note many of these examples send automated input to an interactive bash
session.

```bash
$ termsnap -l 9 -c 28 -- cowsay Hello, world
```

![Termsnap output of the cowsay command saying "hello world"](./media/cow.svg)

```bash
$ (
sleep 0.05
echo -ne "for x in {16..231}; do printf \"\\\e[48;5;\${x}m%03d\\\e[0m \" \$x; done\r"
sleep 0.05
) | termsnap -l 16 -c 72 -- bash --noprofile --rcfile "$PWD/scripts/inputrc"
```

![Termsnap output of a dump of indexed terminal colors](./media/colors.svg)

```bash
$ termsnap -l 12 -c 60 -- nvim --clean ./scripts/example.py <<EOF
:set number
:syntax enable
:q
EOF
```

![Termsnap output of example Python code viewed in Neovim](./media/nvim.svg)

```bash
$ (
sleep 0.05
printf "echo \$-\r"
sleep 0.05
printf "tty\r"
sleep 0.05
) | termsnap -l 12 -c 60 -- bash --noprofile --rcfile "$PWD/scripts/inputrc"
```

![Termsnap output of some tty commands](./media/tty.svg)

## Installation
Expand Down

0 comments on commit 12680d7

Please sign in to comment.