Skip to main content
This guide walks you through your first use of hline, from launch to copying commands from your bash history.

Launch hline

With your default bash history file (~/.bash_history):
hline
Or specify a custom history file:
hline --file /path/to/custom_history
You’ll see a TUI showing your bash history with a centered cursor.
1

Move up and down

Use j or Down to move down one line.Use k or Up to move up one line.The cursor stays centered, and the list scrolls around it for comfortable browsing.
2

Jump quickly

Press g to jump to the top of your history.Press G (Shift+g) to jump to the bottom.Use Ctrl+d or PageDown to move down half a page.Use Ctrl+u or PageUp to move up half a page.
3

Get help

Press ? to show the help screen with all keybindings.Press Esc or ? again to close help.

Search and filter

You can filter your history to find specific commands quickly.
1

Enter search mode

Press / to enter search mode.The bottom of the screen shows your search query as you type.
2

Type your search

Start typing to filter the history. For example, type git to show only git commands.Search is case-insensitive and matches anywhere in the command.The results update live as you type.
3

Exit search mode

Press Enter to confirm the search and return to normal mode (filter remains active).Press Esc to exit search mode.
In search mode, you can use:
  • Backspace to delete the last character
  • Ctrl+w to delete the last word
  • Ctrl+u to clear the entire search query

Copy commands

Copy a single command

Navigate to the command you want and press y to copy it to your clipboard. You’ll see a confirmation toast: Copied 1 line.

Copy multiple commands

1

Select commands

Navigate to a command and press Space to select it.A visual indicator shows selected items.Repeat for each command you want to copy.
2

Copy selected

Press y to copy all selected commands to your clipboard.You’ll see: Copied N lines where N is the number of selected commands.Commands are copied in the order you selected them, separated by newlines.
3

Clear selection (optional)

Press c to clear all selections.You’ll see: Cleared selections.
You can also press a to select all currently visible (filtered) commands at once.

Sort your history

By default, history is sorted by recency (newest first).
1

Cycle sort modes

Press s to cycle through sort modes:
  • Recency - newest or oldest first
  • Alphabetical - A→Z or Z→A
  • Length - short→long or long→short
2

Reverse sort direction

Press S (Shift+s) to reverse the current sort direction.For example, toggle between newest-first and oldest-first.
The current sort mode is shown in the status bar at the bottom of the screen.

Exit hline

Press q to quit and return to your terminal.

Essential keybindings

  • Space - Toggle selection on current line
  • a - Select all visible commands
  • c - Clear all selections
  • y - Copy selected commands (or current if none selected)
  • s - Cycle sort mode (recency → alphabetical → length)
  • S - Reverse sort direction
  • ? - Show/hide help
  • q - Quit

Next steps

Now that you know the basics, explore more features:

Build docs developers (and LLMs) love