From dca7a6dccb3dcf0bbe2554ed0f3c5f628e785b6d Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Fri, 25 Dec 2020 17:55:46 +0100 Subject: [PATCH] doc: add usage of \n --- doc/2_usage.md | 2 +- doc/3_advanced.md | 7 ++++--- doc/6_reference.md | 4 +++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/2_usage.md b/doc/2_usage.md index 71ad2bf..6d920da 100644 --- a/doc/2_usage.md +++ b/doc/2_usage.md @@ -329,5 +329,5 @@ send_action "${CHAT[ID]}" "action" #### [Prev Create Bot](1_firstbot.md) #### [Next Advanced Usage](3_advanced.md) -#### $$VERSION$$ v1.2-dev2-65-ga9852ef +#### $$VERSION$$ v1.2-dev2-70-g1dd9441 diff --git a/doc/3_advanced.md b/doc/3_advanced.md index 3876730..76b02b3 100644 --- a/doc/3_advanced.md +++ b/doc/3_advanced.md @@ -106,7 +106,7 @@ echo -e "Your Message: ${test}\nbye!" #### message formatting and keyboards The output of the script will be processed by 'send_messages', so you can not only send text, but also keyboards, files, locations and more. -Each newline in the output will start an new message to the user, to insert line breaks in your message you must insert ' mynewlinestartshere ' instead of a newline.. +Each newline in the output will start an new message to the userr. To have line breaks in your message you must insert ' mynewlinestartshere ' or '\n' instead. To open up a keyboard in an interactive script, print out the keyboard layout in the following way: ```bash @@ -134,9 +134,10 @@ echo "Text that will appear in chat? mykeyboardstartshere [ \"Yep, sure\" , \"No ``` Please note that you can either send a location or a venue, not both. To send a venue add the mytitlestartshere and the myaddressstartshere keywords. -New in v0.6: To insert a linebreak in your message you can insert ```mynewlinestartshere``` in your echo command: +To insert a line break in your message you can insert ` mynewlinestartshere ` or `\n` in your echo command: ```bash echo "Text that will appear in one message mynewlinestartshere with this text on a new line" +echo "Other text message\nwith a newline" # \n instead of mynewlinestartshere ``` New in v0.7: In case you must extend a message already containing a location, a file, a keyboard etc., @@ -298,5 +299,5 @@ Note: If you disable automatic retry, se above, you disable also connection prob #### [Prev Getting started](2_usage.md) #### [Next Expert Use](4_expert.md) -#### $$VERSION$$ v1.2-10-g10c104d +#### $$VERSION$$ v1.2-dev2-70-g1dd9441 diff --git a/doc/6_reference.md b/doc/6_reference.md index 7eb05cd..915da8f 100644 --- a/doc/6_reference.md +++ b/doc/6_reference.md @@ -3,6 +3,8 @@ ### Send, forward, delete messages +To insert line brakes in a message or caption you can place `\n` in the text. + ##### send_action ```send_action``` shows users what your bot is currently doing. @@ -1143,5 +1145,5 @@ The name of your bot is available as bash variable "$ME", there is no need to ca #### [Prev Best Practice](5_practice.md) #### [Next Notes for Developers](7_develop.md) -#### $$VERSION$$ v1.2-dev2-15-g3496a21 +#### $$VERSION$$ v1.2-dev2-70-g1dd9441