summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jtlib/app.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/jtlib/app.py b/jtlib/app.py
index 760b9a4..4894bf0 100644
--- a/jtlib/app.py
+++ b/jtlib/app.py
@@ -50,9 +50,9 @@ class JournalTool(cliapp.Application):
self.settings.string(
['editor'],
- 'editor to launch for journal entries. Must include %s to '
+ 'editor to launch for journal entries. Must include {editor} to '
'indicate where the filename goes',
- default='sensible-editor %s')
+ default='sensible-editor {editor}')
self.settings.boolean(
['push'],
@@ -126,7 +126,8 @@ class JournalTool(cliapp.Application):
def edit_file(self, pathname):
safe_pathname = cliapp.shell_quote(pathname)
- cmdline = ['sh', '-c', self.settings['editor'] % safe_pathname]
+ cmdline = [
+ 'sh', '-c', self.settings['editor'].format(editor=safe_pathname)]
self.runcmd(cmdline, stdin=None, stdout=None, stderr=None)
def choose_draft(self, drafts_dir, args):