def prompt_for_cmd(subcmd, window, cwd, on_done):
    if not hasattr(subcmd, 'cmd_history'):
        subcmd.cmd_history = []
    readview = show_input_panel_with_readline(window,
                                              abbreviate_user(cwd) + " $",
                                              subcmd.cmd_history,
                                              on_done, None, None)
    for (setting, value) in settings().get('input_widget').iteritems():
        readview.settings().set(setting, value)
 def run(self):
     if not hasattr(self, 'cmd_history'):
         self.cmd_history = []
     cwd = cwd_for_window(self.window)
     on_done = partial(self.on_done, cwd)
     inputview = show_input_panel_with_readline(self.window,
                                                abbreviate_user(cwd) + " $",
                                                self.cmd_history,
                                                on_done, None, None)
     for (setting, value) in settings().get('input_widget').iteritems():
         inputview.settings().set(setting, value)
Example #3
0
 def run(self):
     if not hasattr(self, 'cmd_history'):
         self.cmd_history = []
     cwd = cwd_for_window(self.window)
     on_done = partial(self.on_done, cwd)
     inputview = show_input_panel_with_readline(self.window,
                                                abbreviate_user(cwd) + " $",
                                                self.cmd_history,
                                                on_done, None, None)
     for (setting, value) in settings().get('input_widget').iteritems():
         inputview.settings().set(setting, value)