[spp] [PATCH 10/12] spp: add mkdir command and its completion
ogawa.yasufumi at lab.ntt.co.jp
ogawa.yasufumi at lab.ntt.co.jp
Tue Mar 6 11:39:27 CET 2018
From: Yasufumi Ogawa <ogawa.yasufumi at lab.ntt.co.jp>
Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi at lab.ntt.co.jp>
---
src/spp.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/spp.py b/src/spp.py
index ef7d998..232b528 100755
--- a/src/spp.py
+++ b/src/spp.py
@@ -767,6 +767,13 @@ class Shell(cmd.Cmd, object):
else:
print("No such a directory.")
+ def complete_mkdir(self, text, line, begidx, endidx):
+ return self.compl_common(text, line)
+
+ def do_mkdir(self, args):
+ c = 'mkdir -p %s' % args
+ subprocess.call(c, shell=True)
+
def do_bye(self, arg):
"""Stop recording, close SPP, and exit: BYE"""
--
2.13.1
More information about the spp
mailing list