We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7a6753 commit 163b64fCopy full SHA for 163b64f
bpython/config.py
@@ -68,6 +68,11 @@ def default_config_path():
68
return get_config_home() / "config"
69
70
71
+def default_editor():
72
+ """Returns the default editor."""
73
+ return os.environ.get("VISUAL", os.environ.get("EDITOR", "vi"))
74
+
75
76
def fill_config_with_default_values(config, default_values):
77
for section in default_values.keys():
78
if not config.has_section(section):
@@ -91,7 +96,7 @@ def loadini(struct, config_path):
91
96
"complete_magic_methods": True,
92
97
"dedent_after": 1,
93
98
"default_autoreload": False,
94
- "editor": os.environ.get("VISUAL", os.environ.get("EDITOR", "vi")),
99
+ "editor": default_editor(),
95
100
"flush_output": True,
101
"import_completion_skiplist": ":".join(
102
(
0 commit comments