How do I get the command history in a screen session using Bash?

前端 未结 7 1729
悲&欢浪女
悲&欢浪女 2021-02-01 19:08

If I start a screen session with screen -dmS name, how would I access the command history of that screen session with a script?

Using the , the

相关标签:
7条回答
  • 2021-02-01 19:54

    screen doesn't maintain a history of the commands you type. Your shell may or may not keep a history. Since you appear to use bash, you can use the history command.

    screen does appear to have a crude approximation of a history search (it merely searches the scrollback buffer for a command line. See the screen man page under the "history" command (bound to C-a { by default).

    0 讨论(0)
提交回复
热议问题