aboutsummaryrefslogtreecommitdiffstats
path: root/pySim-shell.py
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2023-11-01 23:42:55 +0100
committerHarald Welte <laforge@osmocom.org>2023-11-03 00:43:17 +0100
commit977c5925a174c53568c79ad0084e2afc3da0960b (patch)
treec71feea658de12eb52e3bc497a0f382a69efebc0 /pySim-shell.py
parent4e59d89a5dec1df4700bf732c1802cf6bfcec38b (diff)
pySim-shell: permit string with spaces for 'echo' command
before this patch: pySIM-shell (00:MF)> echo foo bar baz usage: echo [-h] string echo: error: unrecognized arguments: bar baz after this patch: pySIM-shell (00:MF)> echo foo bar baz foo bar baz Change-Id: I1369bc3aa975865e3a8a574c132e469813a9f6b9
Diffstat (limited to 'pySim-shell.py')
-rwxr-xr-xpySim-shell.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pySim-shell.py b/pySim-shell.py
index d9c9f8c..306dd40 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -510,13 +510,13 @@ Online manual available at https://downloads.osmocom.org/docs/pysim/master/html/
first = False
echo_parser = argparse.ArgumentParser()
- echo_parser.add_argument('string', help="string to echo on the shell")
+ echo_parser.add_argument('string', help="string to echo on the shell", nargs='+')
@cmd2.with_argparser(echo_parser)
@cmd2.with_category(CUSTOM_CATEGORY)
def do_echo(self, opts):
"""Echo (print) a string on the console"""
- self.poutput(opts.string)
+ self.poutput(' '.join(opts.string))
@cmd2.with_category(CUSTOM_CATEGORY)
def do_version(self, opts):