I have a small TCP client/server application in C and on Linux where a client can connect e.g. via telnet to a server-side cli. On the server, after accept is called, forkpty(3) is executed and traffic between master (pty) and the socket is forwarded. The slave (pty) implements a cli that uses libreadline. That all already works well.

My only question is, how do I get libreadline auto-completion to work? I have implemented auto-completion and can use it stand-alone on my shell, but not on the pty (two tabs are just printed instead). Any hints would be nice!

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top