summaryrefslogtreecommitdiff
path: root/cmd2/plugin.py
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2018-06-03 12:53:05 -0600
committerkotfu <kotfu@kotfu.net>2018-06-03 12:53:05 -0600
commite5a0f306a16bb06406ba3c6f88821bfe6c8ca738 (patch)
tree86d8ecf0839491b7fa29629326886aa9fe0b366b /cmd2/plugin.py
parenteaf7415f010ab82688a0a30627a0efa2419f2837 (diff)
downloadcmd2-git-e5a0f306a16bb06406ba3c6f88821bfe6c8ca738.tar.gz
Begin converting precmd to passing and returning a data object
Diffstat (limited to 'cmd2/plugin.py')
-rw-r--r--cmd2/plugin.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/cmd2/plugin.py b/cmd2/plugin.py
new file mode 100644
index 00000000..47f4a514
--- /dev/null
+++ b/cmd2/plugin.py
@@ -0,0 +1,21 @@
+#
+# coding=utf-8
+"""Classes for the cmd2 plugin system"""
+import attr
+
+@attr.s
+class PostparsingData():
+ stop = attr.ib()
+ statement = attr.ib()
+
+@attr.s
+class PrecommandData():
+ statement = attr.ib()
+
+@attr.s
+class PostcommandData():
+ stop = attr.ib(default=False)
+
+@attr.s
+class CommandFinalizationData():
+ stop = attr.ib(default=False)