Supply new log message from stdin when editing log message

Sam Lee <[email protected]> Tue, 19 Apr 2022 03:30:34 +0000
Newsgroups gmane.comp.gnu.rcs
Message-ID <20220419033034.h5bj4tclycxevm2v@localhost>
In RCS, `ci` accepts log messages that come from standard input.

    # Example 1:
    echo 'My log message' | ci main.c

    # Example 2:
    ci main.c < log-message.txt

However, it seems that old log messages cannot be edited using a new log
message that comes from standard input. To my knowledge, old log
messages can only be replaced by supplying the new log message as part
of a command line argument.

    # Example 1:
    rcs -m1.23:'My new log message' main.c

    # Example 2:
    rcs -m1.23:"$(cat log-message.txt)" main.c

Is there a way to supply the new log message from stdin instead?

Using `cat` is potentially dangerous because its output could make the
command exceed the maximum allowed length of command line arguments
(ARG_MAX).