Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I fix the q command prompt under cygwin, using mintty?

Tags:

cygwin

mintty

kdb

I find that when launching q from cygwin underneath mintty, the console generally seems to work, however the q) prompt is not displayed. I am just met with a blank line.

I have the latest cygwin, and the latest mintty terminal.

Note that when I launch cygwin using cmd, the q) prompt is there. Just not under mintty. So I have a viable, but not ideal workaround. Various aspects of mintty are coded deep into my muscle memory.

mintty's wikipedia entry states:

Since [mintty] is not based on the standard Windows console, however, programs written specifically for that do not work correctly in mintty

So I suspect that is the cause here. But was wondering if anyone has been able to get kdb/q to work in this setup.

In summary, can the q interpreter be made to fully work under mintty?

like image 714
pamphlet Avatar asked May 14 '14 19:05

pamphlet


People also ask

What is MinTTY used for?

mintty is a free and open source terminal emulator for Cygwin, the Unix-like environment for Windows.

What is MinTTY shell?

DESCRIPTION. Mintty is a terminal emulator for Cygwin with a native Windows user interface and minimalist design. Its terminal emulation is largely compatible with xterm, but it does not require an X server.

What is MinTTY in git?

MinTTY is the terminal emulator that comes by default with Git for Windows. It has known issues with gh's ability to prompt a user for input. There are a few workarounds to make gh work with MinTTY: Reinstall Git for Windows, checking "Enable experimental support for pseudo consoles".


1 Answers

I realise this is quite an old question, but in case anyone comes across this in future, here's a solution.

You can make use of the "winpty" package from https://github.com/rprichard/winpty/releases

You will want to download the latest 32-bit or 64-bit Cygwin version, depending on which version of Cygwin you have installed. You can then extract the downloaded .tar.gz file into the cygwin installation dir (e.g. C:/Cygwin64)

Once you've done this, you can run q with winpty q e.g.

user@computer ~
$ winpty q
KDB+ 3.5 2017.03.28 Copyright (C) 1993-2017 Kx Systems
w32/ 4()core 4095MB user computer 192.168.1.118 NONEXPIRE

q)1+1
2
q)
like image 133
Jonathon McMurray Avatar answered Oct 19 '22 22:10

Jonathon McMurray