1

I quite like the option to auto-complete terminal commands from history, using keyboard arrows (as explained here, or here).

Yet, the configuration in .inputrc does not affect the terminal in Guake. How can I implement this same option in Guake? All the configuration files that Guake generates (found in ~/.gconf/apps/guake/) are in the .xml format. For example, this is the list of the "general config" file:

<?xml version="1.0"?>
<gconf>
    <entry name="window_ontop" mtime="1480435601" type="bool" value="false"/>
    <entry name="compat_delete" mtime="1480435601" type="string">
        <stringvalue>delete-sequence</stringvalue>
    </entry>
    <entry name="compat_backspace" mtime="1480435601" type="string">
        <stringvalue>ascii-delete</stringvalue>
    </entry>
    <entry name="use_palette_font_and_background_color" mtime="1480435601" type="bool" value="true"/>
    <entry name="use_default_font" mtime="1480435601" type="bool" value="true"/>
    <entry name="scroll_keystroke" mtime="1480435601" type="bool" value="true"/>
    <entry name="history_size" mtime="1480435601" type="int" value="1024"/>
    <entry name="use_scrollbar" mtime="1480435601" type="bool" value="true"/>
    <entry name="mouse_display" mtime="1480435601" type="bool" value="true"/>
    <entry name="display_n" mtime="1480435601" type="int" value="0"/>
    <entry name="quick_open_command_line" mtime="1480435601" type="string">
        <stringvalue>gedit %(file_path)s</stringvalue>
    </entry>
    <entry name="window_tabbar" mtime="1480435601" type="bool" value="true"/>
    <entry name="window_halignment" mtime="1480435601" type="int" value="0"/>
    <entry name="window_width_f" mtime="1480435601" type="float" value="100"/>
    <entry name="window_width" mtime="1480435601" type="int" value="100"/>
    <entry name="window_losefocus" mtime="1480435603" type="bool" value="true"/>
    <entry name="prompt_on_close_tab" mtime="1480435601" type="int" value="0"/>
    <entry name="prompt_on_quit" mtime="1480435601" type="bool" value="true"/>
    <entry name="use_popup" mtime="1480433461" type="bool" value="false"/>
    <entry name="use_trayicon" mtime="1480433454" type="bool" value="false"/>
</gconf>

I have no idea how to translate the instruction given in the two links to xml.

  • You are confusing the shell (a program which runs in a virtual terminal or in a terminal emulator) and the terminal emulator itself. They are different programs, and they use the word "history" with different meanings. – AlexP Jan 9 '17 at 12:01
  • Thanks, but how is that relevant to my question? Guake terminal works just like a normal terminal emulator. Standard shortcuts (e.g. Ctrl+K to delete forward text) apply there too. So I don't see why it would not be possible (which seems to be implied in your comment). – user308164 Jan 9 '17 at 13:15
  • The terminal emulator has no notion of text. It displays individual characters in a grid of 80 columns by 25 lines, or whatever you set it to. It does not implement shortcuts to retrieve lines of text from history, delete words or whatever. That's the shell (or in general the program running in the terminal), specifically in the case of Bash, the GNU Readline library. – AlexP Jan 9 '17 at 13:28
  • What happens exactly when you hit the arrow keys? Are you sure that your guake instance is actually running bash (not, for example, sh)? – steeldriver Jan 9 '17 at 13:34
  • @luchonacho why don't you go ahead and write an answer? I don't have guake installed. You might want to consider adding a link to Arrow keys, tab-complete not working – steeldriver Jan 9 '17 at 14:18
0

As "steeldriver" suggested, the problem is that the shell interpreter used by the embedded Guake terminal was not set up as "bash" (which is the one that is affected by .inputrc. As "AlexP" mentioned, Guake is simply displaying (emulating) a terminal, and changes to "bash" should be global across all emulators.

Thus, to enable history search in Guake, I simply had to change the shell used in Guake. This is done in Preferences, under the "Shell" tab:

enter image description here

A related answer (albeit not for Guake) can be found here.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy