1

Is there something similar to Vim's "Command Line Window" for Bash where I can see/edit/execute items from the history?

In Vim when I press : and then Ctrl-F it opens the window that shows the entire command history:

7. Command-line window              *cmdline-window* *cmdwin*
                            *command-line-window*
In the command-line window the command line can be edited just like editing
text in any window.  It is a special kind of window, because you cannot leave
it in a normal way.

OPEN                        *c_CTRL-F* *q:* *q/* *q?*

[..]

When the window opens it is filled with the command-line history.  The last
line contains the command as typed so far.  The left column will show a
character that indicates the type of command-line being edited, see
|cmdwin-char|.

When you press Enter the current line is executed.

(I know that I can search the history with Ctrl-R, / (vi-mode), etc.)

5

You have two alternatives.

Either you can install hstr (https://github.com/dvorka/hstr) which features a suggest box with advanced search options to easily view, navigate, search, and manage your command history:

enter image description here

Otherwise, Bash features a vi-like command line history editor. Do a set -o vi, then you can search throughout history via these keystrokes:

Esc enters command mode

/ begins a search; type search string, then Enter to perform a search.

n goes to next match, while N goes to the previous match

i goes back to insert mode

1

Similar to the mentioned hstr, fzf (fuzzy finder) is an interactive filter for drilling down into lists, not just shell history (a Ctrl + R shortcut for that is provided out of the box), but also more files, hostnames, and so on. There are multiple search modes (fuzzy or literal), too.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.