Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>See the <a href="http://tiswww.case.edu/php/chet/bash/bashref.html#SEC123" rel="nofollow">Using History Interactively</a> section of the Bash Reference Manual for ways you can execute commands from your history.</p> <p>For example, typing <code>!?foo</code> and pressing <kbd>Enter</kbd> will execute the most recent command containing "foo". I like to have <code>shopt -s histverify histreedit</code> in my <code>~/.bashrc</code> so I can edit and confirm the command, if necessary rather than executing it immediately.</p> <p>Also see the <a href="http://tiswww.case.edu/php/chet/bash/bashref.html#SEC110" rel="nofollow">Commands For Manipulating The History</a> section for keystrokes you can use to search for history entries to recall and execute.</p> <p>For example, pressing <kbd>Ctrl</kbd>-<kbd>r</kbd> and typing <code>foo</code> will recall the most recent command containing "foo". You can press <kbd>Ctrl</kbd>-<kbd>r</kbd> additional times to continue searching in reverse for additional matching commands. Press <kbd>Enter</kbd> when you're ready to execute the one currently shown or <kbd>Ctrl</kbd>-<kbd>g</kbd> to abort the search.</p> <p>If you add <code>stty -ixon</code> to your <code>~/.bashrc</code>, then you can use <kbd>Ctrl</kbd>-<kbd>s</kbd> to search forward through history after you've begun searching backward.</p> <p>Of course, you can save your functions by editing <code>~/.bashrc</code> and adding them to it. I prefer to keep my functions in a file I created called <code>~/bin/functions</code> and then add a line to <code>~/.bashrc</code> to source that file. The line looks like <code>. ~/bin/functions</code>.</p> <p>I save larger scripts in <code>/usr/local/bin</code> or <code>~/bin</code>. The former should already be in your path and you can add the latter to your path by editing <code>~/.bashrc</code>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload