aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/command.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2017-12-17 10:34:29 +1300
committerAldo Cortesi <aldo@corte.si>2017-12-17 10:34:29 +1300
commite549b63465253a8b4cdb17efbf130e20371aa3b0 (patch)
treee3d2078d88d7184e6d7f23b6db4d29b5a417dfa7 /mitmproxy/command.py
parentac335057a7829e2972ab6af56fa1d977623d5426 (diff)
downloadmitmproxy-e549b63465253a8b4cdb17efbf130e20371aa3b0.tar.gz
mitmproxy-e549b63465253a8b4cdb17efbf130e20371aa3b0.tar.bz2
mitmproxy-e549b63465253a8b4cdb17efbf130e20371aa3b0.zip
commander: add completion for flowspecs
Diffstat (limited to 'mitmproxy/command.py')
-rw-r--r--mitmproxy/command.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/mitmproxy/command.py b/mitmproxy/command.py
index 2d51317c..22c2376b 100644
--- a/mitmproxy/command.py
+++ b/mitmproxy/command.py
@@ -24,6 +24,32 @@ def lexer(s):
return lex
+# This is an awkward location for these values, but it's better than having
+# the console core import and depend on an addon. FIXME: Add a way for
+# addons to add custom types and manage their completion and validation.
+valid_flow_prefixes = [
+ "@all",
+ "@focus",
+ "@shown",
+ "@hidden",
+ "@marked",
+ "@unmarked",
+ "~q",
+ "~s",
+ "~a",
+ "~hq",
+ "~hs",
+ "~b",
+ "~bq",
+ "~bs",
+ "~t",
+ "~d",
+ "~m",
+ "~u",
+ "~c",
+]
+
+
Cuts = typing.Sequence[
typing.Sequence[typing.Union[str, bytes]]
]