summaryrefslogtreecommitdiffstats
path: root/Examples/test_script_mode.sh
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2018-02-08 17:56:31 +0100
committerDave Davenport <qball@gmpclient.org>2018-02-08 17:56:31 +0100
commit0f1717f829e95d7f3e1ac5b213d3f73f09b0da62 (patch)
treebe57a198fd20cf6751f307ac4bac87f54462712d /Examples/test_script_mode.sh
parent521843e9be17686624fbeef973e5cd0f520f02d1 (diff)
[Script] Reset highlighting when reload view
Issue: #767
Diffstat (limited to 'Examples/test_script_mode.sh')
-rwxr-xr-xExamples/test_script_mode.sh35
1 files changed, 23 insertions, 12 deletions
diff --git a/Examples/test_script_mode.sh b/Examples/test_script_mode.sh
index 61e29141..a58ef83e 100755
--- a/Examples/test_script_mode.sh
+++ b/Examples/test_script_mode.sh
@@ -1,17 +1,28 @@
#!/usr/bin/env bash
-echo -en "\x00prompt\x1ftesting\n"
-echo -en "\0urgent\x1f0,2\n"
-echo -en "\0active\x1f1\n"
-echo -en "\0markup-rows\x1ftrue\n"
-echo -en "\0message\x1fSpecial <b>bold</b>message\n"
+if [ x"$@" = x"quit" ]
+then
+ exit 0
+fi
-echo "aap"
-echo "noot"
-echo "mies"
-echo "testing"
-echo "<b>Bold</b>"
-if [ -n "$@" ]
+if [ "$@" ]
then
- echo "$@"
+ for a in {1..10}
+ do
+ echo "$a"
+ done
+ echo "quit"
+else
+ echo -en "\x00prompt\x1ftesting\n"
+ echo -en "\0urgent\x1f0,2\n"
+ echo -en "\0active\x1f1\n"
+ echo -en "\0markup-rows\x1ftrue\n"
+ echo -en "\0message\x1fSpecial <b>bold</b>message\n"
+
+ echo "aap"
+ echo "noot"
+ echo "mies"
+ echo "testing"
+ echo "<b>Bold</b>"
+ echo "quit"
fi