ts-comint icon indicating copy to clipboard operation
ts-comint copied to clipboard

Gibberish Output

Open madorian opened this issue 5 years ago • 3 comments

No matter what I C-c C-b, it's printing out lots of nonsensical output:

Any idea how to troubleshoot this?;)


> > c> cl> cla> clas> class> class > class F> class Fo> class Foo> class Foo > class Foo {                                                                                                                                                    
.... ..  ..  b..  ba..  bar..  bar:..  bar: ..  bar: S..  bar: St..  bar: Str..  bar: Stri..  bar: Strin..  bar: String..  bar: String;                                                                                                       
....}                                                                                                                                                                                                                                         
Duplicate identifier 'Foo'.                                                                                                                                                                                                                   
Duplicate identifier 'Foo'.                                                                                                                                                                                                                   
> >                                                                                                                                                                                                                                           
undefined                                                                                                                                                                                                                                     
> > l> le> let> let > let f> let f > let f => let f = > let f = n> let f = ne> let f = new> let f = new > let f = new F> let f = new Fo> let f = new Foo> let f = new Foo(> let f = new Foo()> let f = new Foo();                             
Cannot redeclare block-scoped variable 'f'.                                                                                                                                                                                                   
Cannot redeclare block-scoped variable 'f'.                                                                                                                                                                                                   
> > > c> co> con> cons> conso> consol> console> console.> console.l> console.lo> console.log> console.log(> console.log(f> console.log(f.> console.log(f.b> console.log(f.ba> console.log(f.bar> console.log(f.bar)> console.log(f.bar);      
undefined                                                                                                                                                                                                                                     
undefined                                                                                                                                                                                                                                     
>                                                                                                                                                                                                                                             
undefined          

madorian avatar Aug 22 '20 23:08 madorian

I've tested and can confirm that this is easily reproducable.

Please note, since the advent of LSP and better real-time feedback on typescript code inside Emacs, my need for this module has diminshed to the point that I don't even have it in my default-setup anymore.

The bad news? That also means I probably won't spend time fixing bugs for it.

PRs are welcome though, and I promise to test and review incoming patches.

josteink avatar Mar 04 '21 09:03 josteink

From what I can tell, this seems to be a result of the underlying tool used (tsun) now outputting fancy ANSI-codes instead of plain text.

It seems to have no command line option to disable this behaviour.

It also seems to not really care/respect the TERM-capabilities of the current session, which I hoped could be a quick workaround, so for the time being I guess this is left unresolved.

josteink avatar Mar 04 '21 09:03 josteink

@josteink lets open an issue in tsun asking for a command line option to disable colors? @madorian for now, using tsun version 0.1.5, seems to solve the output issues with ts-commit

This command should replace tsun version globally:

npm i -g [email protected]

kaue avatar Jun 13 '21 11:06 kaue

Old issue is old. Closing! :)

josteink avatar Oct 11 '23 08:10 josteink