← Zomato questions

Design Ctrl + R reverse search for bash history

Filed under Zomato

The question

Design the 'Ctrl + R' reverse search feature of bash that queries previously typed commands from a memory history. Implement finding previous/next commands from the current position and finding the nth matching previous command matching a substring query.

No write-up yet. Related questions below have one.

Related Zomato questions

Collected from public candidate posts and coding forums. Updated Nov 2026.