0

You can hit ctrl-r from the command line to initiate a search for a previously issued command. You can then hit ctrl-r to cycle back through the older commands that match the search string.

However, there doesn't seem to be a way to cycle forward through the commands after you've cycled backwards. ctrl-s is supposed to do this but it doesn't work for me. I've search google but have come up empty on finding an alternative.

1 Answer 1

1

I think you may like Rob's Terminal History Management. You get matches, then the up and down arrow keys let you browse. Almost forgot, the file you want to edit is now ".bash_profile". Open your home folder and press ⇧⌘. to see it.

9
  • I tried going into "verbatim mode" like the tutorial said but when I did, the up arrow just moved my cursor up. It didn't insert any special character.
    – StevieD
    Commented Aug 18, 2018 at 21:41
  • Position your cursor again, then hold the escape key a little longer before pressing "v". I discovered that the first time I pressed escape+v, it just typed a "v". If that happens you can press delete to get rid if the "v", then try again. If you mess up, you can press ctrl+x, then "n", then try "nano .bash_profile" at the command prompt again.
    – Trellis
    Commented Aug 18, 2018 at 23:08
  • It does type a bracket but then when I try to hit the up arrow, it just moves up. There is no "verbatim mode" indicator that pops up as explained in the tutorial.
    – StevieD
    Commented Aug 18, 2018 at 23:20
  • OK, I'm starting to wonder about keyboard layout customization for the system or for the Terminal. Do you have a Touch Bar laptop by any chance? I don't have much experience with those, but when editing in Nano in the Terminal, you should be able to see "[ Verbatim Input ]" in reverse contrast just above and at the center of the bottom array of shortcut reminders in the Terminal window. Do you have an alternate keyboard profile selected in Terminal Preferences?
    – Trellis
    Commented Aug 19, 2018 at 2:19
  • I have a touch bar, yes.
    – StevieD
    Commented Aug 19, 2018 at 3:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .