summaryrefslogtreecommitdiff
path: root/tests/scripts
diff options
context:
space:
mode:
authorAlfred Levy <alevy03@gmail.com>2017-09-22 13:58:17 -0400
committerAlfred Levy <alevy03@gmail.com>2017-09-22 13:58:17 -0400
commit6fa589b3c50352eea2d15f3ad69c91c5118f71d8 (patch)
tree023942c4ca32c7385717cff66f2621052893b324 /tests/scripts
parent6d711bcb104b5afd0bfb49cbe30410ec5b8fadd5 (diff)
downloadcmd2-git-6fa589b3c50352eea2d15f3ad69c91c5118f71d8.tar.gz
Provide method to run multiple commands w/o a cmdloop.
runcmds_plus_hooks can accept multiple commands process the command queue to deal with subsequent commands loaded from scripts without requiring a command loop. This better supports a one-off batch processing scenario. Also fixed the insertion order of commands placed in the command queue by load and _relative_load so that script commands are run in the expected order. Minor tweak to setup instructions in CONTRIBUTING.md to include pyperclip in prerequisites.
Diffstat (limited to 'tests/scripts')
-rw-r--r--tests/scripts/nested.txt4
-rw-r--r--tests/scripts/postcmds.txt2
-rw-r--r--tests/scripts/precmds.txt2
3 files changed, 8 insertions, 0 deletions
diff --git a/tests/scripts/nested.txt b/tests/scripts/nested.txt
new file mode 100644
index 00000000..ac3b4748
--- /dev/null
+++ b/tests/scripts/nested.txt
@@ -0,0 +1,4 @@
+_relative_load precmds.txt
+help
+shortcuts
+_relative_load postcmds.txt
diff --git a/tests/scripts/postcmds.txt b/tests/scripts/postcmds.txt
new file mode 100644
index 00000000..760bcdf5
--- /dev/null
+++ b/tests/scripts/postcmds.txt
@@ -0,0 +1,2 @@
+set abbrev off
+set colors off
diff --git a/tests/scripts/precmds.txt b/tests/scripts/precmds.txt
new file mode 100644
index 00000000..d8857e92
--- /dev/null
+++ b/tests/scripts/precmds.txt
@@ -0,0 +1,2 @@
+set abbrev on
+set colors on