Skip to content

Commit

Permalink
docs: Added docs about multiple default parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
RamiAwar committed Feb 29, 2024
1 parent 232ea0b commit 3cd490f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,27 @@ So I made it possible to register snippets with description and search them easi
`pet` has the following features.

- Register your command snippets easily.
- Use variables in snippets.
- Use variables (with one or several default values) in snippets.
- Search snippets interactively.
- Run snippets directly.
- Edit snippets easily (config is just a TOML file).
- Sync snippets via Gist or GitLab Snippets automatically.

# Parameters
There are `<n_ways>` ways of entering parameters.

They can contain default values: Hello `<subject=world>`
defined by the equal sign.

They can even contain `<content=spaces & = signs>` where the default value would be \<content=<mark>spaces & = signs</mark>\>.

Default values just can't \<end with spaces \>.

They can also contain multiple default values:
Hello `<subject=|_John_||_Sam_||_Jane Doe = special #chars_|>`

The values in this case would be :Hello \<subject=\|\_<mark>John</mark>\_\|\|\_<mark>Sam</mark>\_\|\|\_<mark>Jane Doe = special #chars</mark>\_\|\>

# Examples
Some examples are shown below.

Expand Down

0 comments on commit 3cd490f

Please sign in to comment.