Filter shell commands based on which ones are actually available

pull/99/head
Zach Riggle 10 years ago
parent de79d6ca12
commit 2d7ddf224e

@ -10,6 +10,7 @@ import os
import gdb import gdb
import pwndbg.commands import pwndbg.commands
import pwndbg.which
shellcmds = [ shellcmds = [
"asm", # pwntools "asm", # pwntools
@ -69,6 +70,8 @@ shellcmds = [
"zsh", "zsh",
] ]
shellcmds = filter(pwndbg.which.which, shellcmds)
def register_shell_function(cmd): def register_shell_function(cmd):
def handler(*a): def handler(*a):
"""Invokes %s""" % cmd """Invokes %s""" % cmd

Loading…
Cancel
Save