Merge pull request #2494 from ujjwal96/intercept-toggle

Improve intercept toggle
This commit is contained in:
Thomas Kriechbaumer 2017-08-04 16:38:30 +02:00 committed by GitHub
commit cfd8f8b519
2 changed files with 5 additions and 3 deletions

View File

@ -68,12 +68,14 @@ class ConsoleAddon:
"""
return ["single", "vertical", "horizontal"]
@command.command("intercept_toggle")
@command.command("console.intercept.toggle")
def intercept_toggle(self) -> None:
"""
Toggles interception on/off leaving intercept filters intact.
"""
ctx.options.intercept_active = not ctx.options.intercept_active
ctx.options.update(
intercept_active = not ctx.options.intercept_active
)
@command.command("console.layout.cycle")
def layout_cycle(self) -> None:

View File

@ -24,7 +24,7 @@ def map(km):
km.add("ctrl f", "console.nav.pagedown", ["global"], "Page down")
km.add("ctrl b", "console.nav.pageup", ["global"], "Page up")
km.add("I", "console.command intercept_toggle", ["global"], "Toggle intercept")
km.add("I", "console.intercept.toggle", ["global"], "Toggle intercept")
km.add("i", "console.command set intercept=", ["global"], "Set intercept")
km.add("W", "console.command set save_stream_file=", ["global"], "Stream to file")
km.add("A", "flow.resume @all", ["flowlist", "flowview"], "Resume all intercepted flows")