Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm working on a customer .screenrc for Screen and I can't seem to find a way for it to support variables. Here's what I'm trying to accomplish:

I want to press ^l, then specify a name, and that will be the logfile name. My idea for how the .screenrc file should look was this:

    bindkey "^l" logfile $1

Any ideas on how to properly accomplish this? Thanks!

share|improve this question

2 Answers 2

You can use environment variables.

From man screen:

Commands may contain references to environment variables. The syntax is the shell-like "$VAR " or "${VAR}".

share|improve this answer

Try below setting.

bindkey "^l" colon 'logfile '

You press C-a C-l, then screen input prompt is:

:logfile |
         ^-cursor position

And you continue to input logfile name.

e.g. If you would like to start logging with filename 'hoge.log' then, type this.

C-a C-l hoge.log<ENTER>

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.