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
53e1f8d5
Commit
53e1f8d5
authored
Jan 03, 2013
by
Stavros Sachtouris
Browse files
Allow params starting with - (e.g. history run)
parent
87c00d4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
kamaki/cli/command_shell.py
View file @
53e1f8d5
...
...
@@ -179,7 +179,8 @@ class Shell(Cmd):
cls
=
subcmd
.
get_class
()
ldescr
=
getattr
(
cls
,
'long_description'
,
''
)
if
subcmd
.
path
==
'history_run'
:
instance
=
cls
(
dict
(
cmd_parser
.
arguments
),
instance
=
cls
(
dict
(
cmd_parser
.
arguments
),
self
.
cmd_tree
)
else
:
instance
=
cls
(
dict
(
cmd_parser
.
arguments
))
...
...
@@ -200,10 +201,12 @@ class Shell(Cmd):
arg
.
value
=
getattr
(
cmd_parser
.
parsed
,
name
,
arg
.
default
)
exec_cmd
(
instance
,
[
term
for
term
in
cmd_parser
.
unparsed
\
if
not
term
.
startswith
(
'-'
)]
,
exec_cmd
(
instance
,
cmd_parser
.
unparsed
,
cmd_parser
.
parser
.
print_help
)
#[term for term in cmd_parser.unparsed\
# if not term.startswith('-')],
except
(
ClientError
,
CLIError
)
as
err
:
print_error_message
(
err
)
elif
(
'-h'
in
cmd_args
or
'--help'
in
cmd_args
)
\
...
...
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