'Append an entry to history filename
Slot for append_to_history signal emitted by shell instance'

@Slot(str, str)
def append_to_history(self, filename, command):

    if (not is_text_string(filename)):
        filename = to_text_string(filename.toUtf8(), 'utf-8')
    command = to_text_string(command)
    index = self.filenames.index(filename)
    self.editors[index].append(command)
    if self.get_option('go_to_eof'):
        self.editors[index].set_cursor_position('eof')
    self.tabwidget.setCurrentIndex(index)
