summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Vu-Brugier <cvubrugier@fastmail.fm>2019-05-11 15:15:16 +0200
committerChristophe Vu-Brugier <cvubrugier@fastmail.fm>2019-05-21 21:36:35 +0200
commit311ae0fc49174316c991dd3800c12549632e2c64 (patch)
tree5bc64b2a80c187a3da1cb3dac3dcb26684ec18f1
parente84b89ed709f4f291fbdd8c42b48e2ca187a57ba (diff)
downloadtargetcli-311ae0fc49174316c991dd3800c12549632e2c64.tar.gz
Do not remove the first digit when auto-completing the TPG tag
Instead of removing the first three characters of the "tpg" prefix to get matches for the TPG tag number, the code removes four characters, thus erasing the first digit of the TPG tag number. This patches fixes issue #134. Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
-rw-r--r--targetcli/ui_target.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/targetcli/ui_target.py b/targetcli/ui_target.py
index 6895b38..0c3fe1b 100644
--- a/targetcli/ui_target.py
+++ b/targetcli/ui_target.py
@@ -384,7 +384,7 @@ class UIMultiTPGTarget(UIRTSLibNode):
@rtype: list of str
'''
if current_param == 'tag':
- tags = [child.name[4:] for child in self.children]
+ tags = [child.name[3:] for child in self.children]
completions = [tag for tag in tags if tag.startswith(text)]
else:
completions = []