Use shortcut of id in interactive mode. Closes #881
This commit is contained in:
parent
d9730033bb
commit
c8e568fdd0
1 changed files with 5 additions and 1 deletions
|
|
@ -190,7 +190,11 @@ class ReplApplication(Cmd, ConsoleApplication):
|
|||
try:
|
||||
obj = self.objects[int(id) - 1]
|
||||
except (IndexError, ValueError):
|
||||
pass
|
||||
# Try to find a shortcut in the cache
|
||||
for obj in self.objects:
|
||||
if id in obj.id:
|
||||
id = obj.fullid
|
||||
break
|
||||
else:
|
||||
if isinstance(obj, BaseObject):
|
||||
id = obj.fullid
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue