0

Currently, when I enter ^a : (control-A followed by ':') to send a command to GNU screen, I can go back one step in the history, and see exactly ONE previous command. This is really annoying, as I'm used to being able to go back thousands of steps in my shell history, and I'd like to be able to save at least a few dozen screen commands as well.

How can I do this?

iconoclast
  • 1,688
  • 2
  • 18
  • 30

2 Answers2

3

This is actually a function of screen and, in its current release, is NOT possible--only one line of the history is stored. There was a patch posted to the mailing list some time ago, but it may not be applicable today.

Unfortunately, development on screen has slowed significantly, so if you're looking for more modern features, you may want to look at something like tmux--which is newer, but a bit more unstable than screen.

Andrew M.
  • 10,982
  • 2
  • 34
  • 29
  • Thanks, I've looked at tmux, but I've got such an extensive .screenrc that I'm not looking forward to trying to port it over to tmux. Also, it doesn't yet have the killer feature: the ability to save sessions that survive a reboot. ;) – iconoclast Dec 02 '10 at 18:47
  • (Paragraph 2:) does tmux have a real command history, for commands sent to tmux (as opposed to the shell)? – iconoclast Dec 02 '10 at 18:48
  • tmux doesn't use commands in the same vein as screen. I was merely presenting an alternative that is undergoing active development, as that is more likely to see changes. :) – Andrew M. Dec 03 '10 at 02:43
  • I tested it in tmux, and it DOES allow scrolling through command history. – iconoclast Dec 29 '10 at 17:46
-1

Take a look at this thread from last year: GNU screen loses (parts of) command histories

Hesh
  • 68
  • 2