From 06cb68c799e5cd302fdc21c2bc548adf30dd39b3 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 13 Jun 2017 09:30:33 +1200 Subject: [PATCH] Minor: formatting, make default color scheme solarized-dark --- mitmproxy/options.py | 2 +- mitmproxy/tools/console/defaultkeys.py | 30 +++++++++++++++++--------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/mitmproxy/options.py b/mitmproxy/options.py index db276a510..a38726793 100644 --- a/mitmproxy/options.py +++ b/mitmproxy/options.py @@ -394,7 +394,7 @@ class Options(optmanager.OptManager): "Focus follows new flows." ) self.add_option( - "console_palette", str, "dark", + "console_palette", str, "solarized_dark", "Color palette.", choices=sorted(console_palettes), ) diff --git a/mitmproxy/tools/console/defaultkeys.py b/mitmproxy/tools/console/defaultkeys.py index d5b868d07..dbc170bc0 100644 --- a/mitmproxy/tools/console/defaultkeys.py +++ b/mitmproxy/tools/console/defaultkeys.py @@ -36,8 +36,10 @@ def map(km): km.add("D", "view.duplicate @focus", ["flowlist", "flowview"], "Duplicate flow") km.add( "e", - "console.choose.cmd Format export.formats " - "console.command export.file {choice} @focus ''", + """ + console.choose.cmd Format export.formats + console.command export.file {choice} @focus '' + """, ["flowlist", "flowview"], "Export this flow to file" ) @@ -60,8 +62,10 @@ def map(km): ) km.add( "o", - "console.choose.cmd Order view.order.options " - "set console_order={choice}", + """ + console.choose.cmd Order view.order.options + set console_order={choice} + """, ["flowlist"], "Set flow list order" ) @@ -83,8 +87,10 @@ def map(km): km.add( "e", - "console.choose.cmd Part console.edit.focus.options " - "console.edit.focus {choice}", + """ + console.choose.cmd Part console.edit.focus.options + console.edit.focus {choice} + """, ["flowview"], "Edit a flow component" ) @@ -99,8 +105,10 @@ def map(km): km.add( "v", - "console.choose \"View Part\" request,response " - "console.bodyview @focus {choice}", + """ + console.choose "View Part" request,response + console.bodyview @focus {choice} + """, ["flowview"], "View flow body in an external viewer" ) @@ -108,8 +116,10 @@ def map(km): km.add("m", "console.flowview.mode.set", ["flowview"], "Set flow view mode") km.add( "z", - "console.choose \"Part\" request,response " - "flow.encode.toggle @focus {choice}", + """ + console.choose "Part" request,response + flow.encode.toggle @focus {choice} + """, ["flowview"], "Encode/decode flow body" )