smartconsole.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:iOSSecAudit 作者: alibaba 项目源码 文件源码
def init_history(self, histfile):

        #readline.parse_and_bind("bind ^I rl_complete")

        # Register our completer function
        readline.set_completer(SimpleCompleter(G.cmmands.keys()).complete)


        #readline.set_completer(TabCompleter().complete)
        ### Add autocompletion
        if 'libedit' in readline.__doc__:
            readline.parse_and_bind("bind -e")
            readline.parse_and_bind("bind '\t' rl_complete")
        else:
            readline.parse_and_bind("tab: complete")

        # Use the tab key for completion
        #readline.parse_and_bind('tab: complete')
        if hasattr(readline, "read_history_file"):
            try:
                readline.read_history_file(histfile)
            except:
                pass

            atexit.register(self.save_history, histfile)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号