4

Readline and therefore Bash have a very useful command called operate-and-get-next, bound by default to Ctrl-O, that executes the current line, after selecting it from the history, and advances the history pointer by one, instead of clearing the command line prompt, as Enter would do.

So if you wish to repeat a number of sequential commands you did recently, one by one in the same order, you can:

  1. recall the first command in the sequence from the history
  2. execute it with Ctrl-O
  3. check the output
  4. check that the commandline is now pointing to the next command in the sequence
  5. GOTO 2.

Does Fish have anything like this, or can it be implemented as a function?

1 Answer 1

5

Fish does not have the concept of a "history pointer", which points at the currently selected history entry, so the answer is: No.

You must log in to answer this question.

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