summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2018-07-05 11:28:20 -0600
committerkotfu <kotfu@kotfu.net>2018-07-05 11:28:20 -0600
commit985e790c594a2c48804ffa201f9253eb32a59c8b (patch)
tree2334cb72c56bbd8233d8026e13393bd0a3309c19 /docs
parente5ff9b5787867310fbf350d8b4919b7238015917 (diff)
downloadcmd2-git-985e790c594a2c48804ffa201f9253eb32a59c8b.tar.gz
Add command finalization hooks
Diffstat (limited to 'docs')
-rw-r--r--docs/hooks.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/hooks.rst b/docs/hooks.rst
index fd140331..0ec5d7e9 100644
--- a/docs/hooks.rst
+++ b/docs/hooks.rst
@@ -278,6 +278,8 @@ command finalization hook::
def myhookmethod(self, stop, statement):
return stop
+Command Finalization hooks must check whether the statement object is ``None``. There are certain circumstances where these hooks may be called before the statement has been parsed, so you can't always rely on having a statement.
+
If any prior postparsing or precommand hook has requested the application to
terminate, the value of the ``stop`` parameter passed to the first command
finalization hook will be ``True``. Any command finalization hook can change the