Allow specifying stg's text editor in .stgitrc. Some legacy tools need
an old version of "vi" in EDITOR, but we can be flexible.
Signed-off-by: Chuck Lever <cel@netapp.com>
#smtpuser: username
#smtppassword: password
+# stg will look for this first, then look for the EDITOR environmental
+# variable, then default to using 'vi'
+#editor: /usr/bin/vi
+
[gitmergeonefile]
# Different three-way merge tools below. Uncomment the preferred one.
f.close()
# the editor
- if 'EDITOR' in os.environ:
+ if config.has_option('stgit', 'editor'):
+ editor = config.get('stgit', 'editor')
+ elif 'EDITOR' in os.environ:
editor = os.environ['EDITOR']
else:
editor = 'vi'