Code Monkey home page Code Monkey logo

Comments (7)

cronvel avatar cronvel commented on August 20, 2024

Hi,

To be honest, I know little about Windows' terminals, but we can try to figure out what happens together. Also Windows know only a small subset of escape sequences common to UNIX-like system, but I guess it is at least capable of deleting and inserting line.

Firstly, what terminal exactly is used? Is it the built-in windows terminal? Or does Cygwin use something different (I used Cygwin once in my life 10 years ago, so I don't exactly remember how it works).

Can you copy-paste the output of ./sample/detect-terminal-test.js (from Terminal-kit root directory)?

Does deleteLine() and insertLine() output some nasty sequences or does it fail absolutely silently?

from terminal-kit.

sjurba avatar sjurba commented on August 20, 2024

I'm running Git Bash for Widows. https://git-scm.com/downloads

$ node detect-terminal-test.js

== Environment variable ==

$TERM: cygwin
$COLORTERM:
$VTE_VERSION:


== Using simple terminal guessing ==

.guessTerminal(): {"appId":"cygwin","safe":true,"ssh":false}
Terminal name:
Terminal app ID: cygwin
Generic terminal: cygwin
Config file: xterm.generic.js


== Using advanced terminal detection ==

.getParentTerminalInfo() Error: Command failed: ps: illegal option -- h
Usage ps [-aefl] [-u uid]
-f = show process uids, ppids
-l = show process uids, ppids, pgids, winpids
-u uid = list processes owned by uid
-a, -e = show processes of all users
-s = show process summary
-W = show windows as well as cygwin processes

Terminal name:
Terminal app ID: cygwin
Generic terminal: cygwin
Config file: xterm.generic.js

It fails silently..

from terminal-kit.

sjurba avatar sjurba commented on August 20, 2024

Did some googling.. It seems like delete and insert line is not supported by the windows terminal.

from terminal-kit.

cronvel avatar cronvel commented on August 20, 2024

Can you configure it to use another terminal?

I remember using Console2 last time I used Git on Windows.

Also I found this question on unix.stackexchange.com that might help.

When I run TERM=cygwin infocmp it says that Cygwin supports the insert and delete line escape sequence.

Also I don't know why the TERM environment variable is set to cygwin: Cygwin is not a terminal -_-'

from terminal-kit.

sjurba avatar sjurba commented on August 20, 2024

Meh.. I sort of gave it up.. I tried mintty, but it had even bigger problems: term size was 0x0 and keyboard capture didn't really work.

Windows isn't my platform anymore either. I just wanted to check if my rebase app worked or not.

from terminal-kit.

GongT avatar GongT commented on August 20, 2024

cygwin & msys (git for win) is using Mintty, I think it's support all control sequence, including that even not supported by gnome-terminal or macos default terminal.

a fresh install cygwin or msys will always set TERM=xterm

using any .exe not compiled with cygwin or mingw (and the type and version should match mintty's) will cause 0x0 terminal size, this is not able to resolve right now.

from terminal-kit.

cronvel avatar cronvel commented on August 20, 2024

@GongT Terminal-kit get the terminal size directly from Node.js, see the official doc here and here.
I'm affraid but unless if you can confirm that those values are correctly reported by Node.js, I cannot do anything for you...

from terminal-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.