Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
topydo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
topydo
Commits
1949d371
Commit
1949d371
authored
Jan 15, 2015
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix help for edit subcommand.
parent
d9c9fdcf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
topydo/lib/EditCommand.py
topydo/lib/EditCommand.py
+16
-2
No files found.
topydo/lib/EditCommand.py
View file @
1949d371
...
@@ -21,11 +21,25 @@ from topydo.lib.Command import Command
...
@@ -21,11 +21,25 @@ from topydo.lib.Command import Command
from
topydo.lib.Config
import
config
from
topydo.lib.Config
import
config
class
EditCommand
(
Command
):
class
EditCommand
(
Command
):
def
__init__
(
self
,
p_todolist
,
*
p_args
):
def
__init__
(
self
,
p_args
,
p_todolist
,
p_output
,
p_error
,
p_input
):
super
(
EditCommand
,
self
).
__init__
([],
None
)
super
(
EditCommand
,
self
).
__init__
(
p_args
,
p_todolist
,
p_output
,
p_error
,
p_input
)
def
execute
(
self
):
def
execute
(
self
):
if
not
super
(
EditCommand
,
self
).
execute
():
return
False
editor
=
os
.
environ
[
'EDITOR'
]
or
'vi'
editor
=
os
.
environ
[
'EDITOR'
]
or
'vi'
todo
=
config
().
todotxt
()
todo
=
config
().
todotxt
()
return
call
([
editor
,
todo
])
==
0
return
call
([
editor
,
todo
])
==
0
def
usage
(
self
):
return
"""Synopsis: edit"""
def
help
(
self
):
return
"""Launches a text editor with the todo.txt file.
By default it will use $EDITOR in your environment, otherwise it will fall back
to 'vi'.
"""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment