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
50aa61ac
Commit
50aa61ac
authored
Oct 09, 2014
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for flag to show an unfiltered list.
parent
04638cb0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
Command.py
Command.py
+10
-0
ListCommand.py
ListCommand.py
+4
-2
No files found.
Command.py
View file @
50aa61ac
...
...
@@ -16,5 +16,15 @@ class Command(object):
return
value
def
argumentShift
(
self
,
p_expr
):
"""
Returns true when the first argument equals the given expression.
"""
if
len
(
self
.
args
)
and
self
.
argument
(
0
)
==
p_expr
:
del
self
.
args
[
0
]
return
True
return
False
def
usage
(
self
):
return
""
ListCommand.py
View file @
50aa61ac
...
...
@@ -8,9 +8,11 @@ class ListCommand(Command.Command):
super
(
ListCommand
,
self
).
__init__
(
p_args
,
p_todolist
)
def
execute
(
self
):
showAll
=
self
.
argumentShift
(
"-x"
)
sorter
=
Sorter
.
Sorter
(
Config
.
SORT_STRING
)
filters
=
[
Filter
.
DependencyFilter
(
self
.
todolist
),
Filter
.
RelevanceFilter
()]
filters
=
[
]
if
showAll
else
\
[
Filter
.
DependencyFilter
(
self
.
todolist
),
Filter
.
RelevanceFilter
()]
if
len
(
self
.
args
)
>
0
:
filters
.
append
(
Filter
.
GrepFilter
(
self
.
argument
(
0
)))
...
...
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