linenoise icon indicating copy to clipboard operation
linenoise copied to clipboard

I/O garbled in Xcode's "pseudo" PTY

Open mralexgray opened this issue 10 years ago • 6 comments

you DID say to test it everywhere.... and although the Xcode console is far from compliant with ANYthing.. it would be nice if there was a sane way to interact with it.. which is what led me to your (neat) project.

everything is fine and dandy in iTerm...

screen shot 2015-02-22 at 8 29 46 am

but here's what happens in good'ole Xcode (6.1.1)...

linenoise

arguably, this IS better (though far from ideal)... than what you get with my normal IO routines in the same console environment...

stdio

The Xcode console is very weird.. It has no exposed "size" (COLUMNS, and the such), and also, mine MAY be off kilter a bit.. as I DO have the XCODE_COLORS extension installed (amongst many others). Maybe someone with a stock rig can try it, as well?

Let me know how I can help fix this... if you (and God, 🙏) are wiling...

mralexgray avatar Feb 22 '15 13:02 mralexgray

Hello! If you tested with the latest commit of Linenoise (very likely), it is going to be very hard to fix, because it uses really the bare minimum of pure VT100 capabilities! So likely there is really no decent VT100 support at all in the XCode console :-) Thanks for reporting and for the nice gifs.

antirez avatar Feb 23 '15 10:02 antirez

I'm going to look into it. I didn't mean to sound hopeless.. I mean it almost works. I will fiddle with it and see if I can't muster a more usable state with minimal change required.

mralexgray avatar Feb 24 '15 14:02 mralexgray

@mralexgray I would love to see this :+1:

iliaskarim avatar Feb 24 '15 21:02 iliaskarim

The same issue met, not able to debug with xcode 9.2 console. Really helpless on this when wanna try to replace readline lib.

xrdavies avatar May 30 '18 14:05 xrdavies

Gah! This library is this close -> <- to what I want, but since I cannot use it in Xcode, I'm afraid I cannot use it. If this ever does get resolved (even if that means a reduced feature set when inside Xcode), it would be amazing.

fosterbrereton avatar Oct 28 '20 06:10 fosterbrereton

A workaround I found was to change isUnsupportedTerm to return 1 instead of 0 in the event there is no TERM environment variable. This at least makes the Xcode terminal functional, though it will still be lacking many features.

fosterbrereton avatar Oct 28 '20 07:10 fosterbrereton