Skip to content

Commit

Permalink
docs: add Require documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
maaslalani committed Oct 30, 2022
1 parent d387c94 commit d6032ad
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ ssh vhs.example.com < demo.tape > demo.gif
There are a few basic types of VHS commands:

* [`Output <path>`](#output): specify file output
* [`Require <program>`](#require): specify required programs for tape file
* [`Set <Setting> Value`](#settings): set recording settings
* [`Type "<characters>"`](#type): emulate typing
* [`Left`](#arrow-keys) [`Right`](#arrow-keys) [`Up`](#arrow-keys) [`Down`](#arrow-keys): arrow keys
Expand All @@ -187,6 +188,21 @@ Output out.webm
Output frames/ # a directory of frames as a PNG sequence
```

### Require

The `Require` command allows you to specify dependencies for your tape file.
These are useful to fail early if a required program is missing from the
`$PATH` and it is certain that the VHS execution will not work as expected.

Require commands must be defined at the top of a tape file, before any non-
setting or non-output command.

```elixir
# A tape file that requires gum and glow to be in the $PATH
Require gum
Require glow
```

### Settings

The `Set` command allows you to change global aspects of the terminal, such as
Expand Down
1 change: 1 addition & 0 deletions man.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ A tape file is a script made up of commands describing what actions to perform i
The following is a list of all possible commands in VHS:
* %Output% <path>.(gif|webm|mp4)
* %Require% <program>
* %Set% <setting> <value>
* %Sleep% <time>
* %Type% "<string>"
Expand Down

0 comments on commit d6032ad

Please sign in to comment.