From e166ed1e463220a2b9ac21278817617717d445cd Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Wed, 8 Jan 2020 22:33:56 -0800 Subject: [PATCH] doc/Factoids.md: improvement to `mock` section --- doc/Factoids.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/Factoids.md b/doc/Factoids.md index 5f872162..940d7db6 100644 --- a/doc/Factoids.md +++ b/doc/Factoids.md @@ -247,6 +247,7 @@ Let's make a command, using a Code Factoid, to do this! `sm` stands for "SpongeB This time we'll use the Bash shell scripting language. !factadd sm /code bash echo "${@,,}"|perl -pe 's/(? !factset sm usage Usage: sm !sm Testing one, two... @@ -269,6 +270,7 @@ the mock text for us. First of all, the `recall` command prints output like this: + Girls are dumb! !recall derpy3 girls [5m30s ago] Girls are dumb! @@ -278,14 +280,17 @@ to strip the timestamp and the name, leaving only the message. `smr` stands for !factadd smr /call recall $args | {func sed s/^.*?\] (<.*?> )?(\S+:\s*)?//} | {sm} + Girls are dumb! !smr derpy3 girls gIrLs ArE dUmB! -We can make an alias with a more friendly name. By the way, if the `recall`ed -message is the most recent, there is no need to use an argument (e.g., `girls`). +We can make an alias with a more friendly name. !factalias mock smr +If the recalled message is the most recent, there is no need to use an argument (e.g., `girls`). + + Girls are dumb! !mock derpy3 gIrLs ArE dUmB!