Re: PATCH: script: Introduced a streaming output command

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

 



On Mon, Dec 10, 2018 at 03:47:41PM +0100, Rick van Rein wrote:
> Hi Karel,
> 
> >>  #define DEFAULT_TYPESCRIPT_FILENAME "typescript"
> >> +#define DEFAULT_TYPESCRIPT_COMMAND  "scriptstream"
> > 
> > Do we really need the default command? ;-) 
> 
> Trying without, but then users end up typing things like
> 
> script -s -- nc -q0 seashells.io 1337 | sed 's/$/\\r/'
> 
> There's a lot that can go wrong, and I would complain about that kind of

I think explain the basic concept and possible limits in man page is
good enough. The user has to understand what role the terminal plays 
in the session, how things are isolated and where it prints output.

We probably need to improve the man page and merge NOTES into
DESCRIPTION and be more verbose about all the details.

> interactive experimentation and required shell trickery.  That's why I
> proposed to capture these problems in a default command and issue
> 
> script -s

but in your patch the default command has been only hardcoded path to
non-existing binary. I don't think it resolves anything. I think we
can do the same in the man page ;-)

> Alternatively, we can expect users to wrap such complexity around script
> and invent their own little tools.  What --stream adds over piping is
> then limited, still better but to me it feels incomplete.  I haven't
> tested if it works at all, isatty() inside scripts and such.

Not sure if I fully understand here, but inside interactive script session 
isatty() works as expected as it's standard terminal.

> Your choice?

KISS - keep it simple and stupid :-)

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux