Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Looks like "zpty -r" is adding 0x0d characters...



On Oct 18, 10:45am, DervishD wrote:
}
} I assumed that, by default, things like "echo" or
} "oeche", "echok", etc. were controlled by the "-e" option to "zpty",

Nope, the zpty options only affect the file descriptors, not the tty
modes.

} and things like onlcr were deactivated (any translation, for that
} matter) since the pty is treated like a file more than like a tty.

But the whole point is that it's NOT treated like a file, especially
by the process running on the "slave" side.
 
} > If you don't want this to happen, the program that zpty runs on the
} > pseudo-terminal needs to do the equivalent of "stty -onlcr".
} 
}     That's a bit difficult, because the command I'm running doesn't
} deal with the tty in any way, it just prints output (but for some
} errors it goes interactive, that's why I need zpty in my wrapper).

Remember that the command passed to zpty is run as if with eval, and
zsh already has a mechanism for controlling the stty settings of an
individual command.

    zpty cdda2wav STTY=-onlcr cdda2wav -v toc,sectors -J -H



Messages sorted by: Reverse Date, Date, Thread, Author