mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-06 03:59:31 +01:00
doc/Commands: add example of nesting pipes and substitutions
This commit is contained in:
parent
8934936658
commit
38a0b8705f
@ -9,6 +9,7 @@
|
||||
* [Chaining](#chaining)
|
||||
* [Piping](#piping)
|
||||
* [Substitution](#substitution)
|
||||
* [Nesting Pipes and Substitutions](#nesting-pipes-and-substitutions)
|
||||
* [Variables](#variables)
|
||||
* [Selectors](#selectors)
|
||||
* [Background processing](#background-processing)
|
||||
@ -295,6 +296,16 @@ factoid otherwise it will be expanded first.
|
||||
<pragma-> !img spaces & stuff
|
||||
<PBot> https://google.com/search?tbm=isch&q=spaces%20%26%20stuff
|
||||
|
||||
### Nesting Pipes and Substitutions
|
||||
Both [Piping](#Piping) and [Substitutions](#Substitution) can be nested.
|
||||
|
||||
For example:
|
||||
|
||||
<pragma-> !echo $randomnick's IQ is &{roll 1d50+70}
|
||||
<PBot> mnrmnaugh's IQ is rolled 1d50+70 for 85.
|
||||
<pragma-> !echo $randomnick's IQ is &{roll 1d50+70 | {sed s/rolled.*for //}}
|
||||
<PBot> ntwk's IQ is 110.
|
||||
|
||||
### Variables
|
||||
You can use factoids as variables and interpolate them within commands.
|
||||
|
||||
|
@ -52,6 +52,7 @@
|
||||
* [Chaining](Commands.md#chaining)
|
||||
* [Piping](Commands.md#piping)
|
||||
* [Substitution](Commands.md#substitution)
|
||||
* [Nesting Pipes and Substitutions](Commands.md#nesting-pipes-and-substitutions)
|
||||
* [Variables](Commands.md#variables)
|
||||
* [Selectors](Commands.md#selectors)
|
||||
* [Background processing](Commands.md#background-processing)
|
||||
@ -342,6 +343,7 @@
|
||||
* [Initial virtual machine set-up complete](VirtualMachine.md#initial-virtual-machine-set-up-complete)
|
||||
* [Start PBot VM Host](VirtualMachine.md#start-pbot-vm-host)
|
||||
* [Test PBot](VirtualMachine.md#test-pbot)
|
||||
* [QEMU command from libvirt](VirtualMachine.md#qemu-command-from-libvirt)
|
||||
<!-- md-toc-end -->
|
||||
<!-- md-toc-begin -->
|
||||
* [Frequently Asked Questions](FAQ.md#frequently-asked-questions)
|
||||
|
Loading…
Reference in New Issue
Block a user