Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
kamaki
Commits
33b3595a
Commit
33b3595a
authored
Dec 11, 2012
by
Stavros Sachtouris
Browse files
Plant a _cmd_tree idea in cli.history_recall
If an interface needs a recall, it should provide a full cmd_tree
parent
304c90b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
kamaki/cli/commands/history_cli.py
View file @
33b3595a
...
...
@@ -75,11 +75,21 @@ class history_clean(_init_history):
super
(
self
.
__class__
,
self
).
main
()
self
.
history
.
clean
()
@
command
(
history_cmds
)
class
history_recall
(
_init_history
):
"""Re-call a previously called command"""
_cmd_tree
=
None
def
__init__
(
self
,
arguments
=
{},
cmd_tree
=
None
):
super
(
self
.
__class__
,
self
).
__init__
(
arguments
)
self
.
_cmd_tree
=
cmd_tree
def
main
(
self
,
commandid
):
super
(
self
.
__class__
,
self
).
main
()
r
=
self
.
history
.
retrieve
(
commandid
)
print
(
r
)
if
self
.
_cmd_tree
:
raise
NotImplemented
(
'Sorry, recall is not implemented yet'
)
else
:
print
(
r
)
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