Skip to content

Commit

Permalink
clearer code
Browse files Browse the repository at this point in the history
  • Loading branch information
hoefler02 committed Apr 12, 2021
1 parent 29368d0 commit 46b24aa
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gef.py
Expand Up @@ -10532,10 +10532,15 @@ def do_invoke(self, argv):
if (len(argv) != 1):
self.rm_usage()
return
if not (alias := [__aliases__.index(a) for a in __aliases__ if a._alias == argv[0]]):
found = False
for idx, obj in enumerate(__aliases__):
if (obj._alias == argv[0]):
del __aliases__[idx]
found = True
break
if not found:
err("{0} not found in aliases.".format(argv[0]))
return
del __aliases__[alias[0]]
GefSaveCommand().invoke(None, False)
# TODO: reload GEF so that the alias no longer works in the current session?
return
Expand Down

0 comments on commit 46b24aa

Please sign in to comment.