[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Could I contribute a patch to increase the default remote command bu

From: 张小潘
Subject: Re: Could I contribute a patch to increase the default remote command buffer size?
Date: Tue, 11 Sep 2018 20:53:44 -0700

Hi Neal,

BTW, if you can answer the question in this thread,, that will be super helpful.


On Tue, Sep 11, 2018 at 11:33 AM 张小潘 <address@hidden> wrote:
Hi Neal,

Using 'readbuf' and 'paste' looks also very cool!

On Tue, Sep 11, 2018 at 9:11 AM Neal Fultz <address@hidden> wrote:
I have a similar vim shortcut - for me, instead of using the stuff command, I write to /tmp/screen-exchange, and then use readbuf and paste screen commands.  This also lets you send text containing multiple lines eg for python.

On Tue, Sep 11, 2018 at 8:43 AM 张小潘 <address@hidden> wrote:
Hi there,

I have been using GNU screen for many years and have some personal modifications to make it work better in my environment. There is one change I am looking for contribute back to main repository.

Typically I have two monitors connected to my workstation, and I run one screen session in a terminal window on each of these monitors.  One screen is used to run a Vim session, another screen is used to run a bash session.  The trick here is I wrote a Vim script so that in a special buffer of the vim window, I can edit bash commands, and send these commands to run on the screen window by using  "/usr/bin/screen -S <session> -p <window> -X stuff <shell-command>", which is really handy. (I can share the vim script if anybody wants to see, but that is not my main point here)

One thing annoys me is that screen uses a predefined constant in the source code to define the size to receive the remote command, that is:

    #define MAXSTR 768

    char fullcmd[MAXSTR];

    if (!(fc = strncpy_escape_quote(fc, p, fullcmd + ARRAY_SIZE(fullcmd) - 2))) { /* '"' ' ' */
     Msg(0, "Remote command too long.");
My shell commands are usually quite long (binary with dozens of command line flags) and it can easily exceed the 768 limit. So in my local screen source copy, I changed it to 16384, which works really well for me. As I think in modern computers usually come up with several Gigabytes memory, 16 k is really a small number, so I am writing this email to see if I can contribute this change back to screen main repository, and if yes, what is the appropriate steps to do it.


Xiaopan Zhang - (张小潘)
screen-users mailing list

Xiaopan Zhang - (张小潘)

Xiaopan Zhang - (张小潘)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]