Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 873811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:00:06+00:00 2026-05-15T11:00:06+00:00

I recently made the insanely long overdue switch from tcsh to bash. The only

  • 0

I recently made the insanely long overdue switch from tcsh to bash.
The only thing I miss is tcsh’s ESC+p feature:
Start typing a command and then hit ESC+p (I actually found the equivalent ctrl-[p easier to type) and it jumps to the most recent command in your history that starts with what you’ve typed so far.

Perhaps the best answer is to just get used to bash’s Ctrl+r but so far I don’t like it as much.
I often start typing a command and then it occurs to me that I’ve issued it before.
With tcsh’s feature I could then do ESC+p+Enter to re-issue it. It’s so quick that I’d usually never use up-arrow for anything more than 2 commands ago.

An example of where I found it especially nice:
Long commands often start with a dot, because they’re of the form

./myprogram.pl -lots -of -args -and -switches

In tcsh I would issue a command like that, then maybe ls, less, tail, whatever, and then to reissue the long command, 4 keys: dot, escape, p, enter.

How can I do that in Bash? Or, to make it concrete, what’s the fewest number of keystrokes in bash to say “repeat the last command that started with a dot”? Can it match or beat tcsh’s 4?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:00:07+00:00Added an answer on May 15, 2026 at 11:00 am

    Add this to your ~/.inputrc file:

    "\e[5~": history-search-backward
    "\e[6~": history-search-forward
    

    This will make PageUp act like tcsh’s Esc+p and PageDown will go forward through the list.

    You can bind \ep instead. If you use PageUp / PageDown, you may need to see what character sequence your keyboard/terminal produces. Just press Ctrl+V then PageUp and you’ll see ^[[5~ if it’s the same as \e[5~.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently made the switch to a new job and consequently the switch from
I recently made the change from Dreamweaver to NetBeans and noticed this IDE doesn't
I recently made the move from Linux development to Windows development. And as much
I recently made the Simpletron assignment from the Deitel and Deitel textbook. The Simpletron
I've recently made an UserControl , which took quite a long time, because I
I just recently made the move to Objective-C. I am doing some exercises from
I have recently made the transition from a Java web developer to a C#
I am used to 2000 and recently made the switch to 2008. If anyone
I've been developing in PHP for a while now but only recently made the
I have recently made use of the SrcSrv feature in the Debugging Tools For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.