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

1

6

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?

Mercurochrome answered 14/5, 2014 at 19:1 Comment(6)
This site is so weird. Is this really such a poor question? I could be the 1000000th visitor to ask how to sort a list in Java and people would be climbing all over each other to answer. And all I get here is a drive-by down vote with no suggestion on what's wrong with the question.Mercurochrome
+1 for good response to a -1 :) I think this could be common problem so deserves an answer. I don't have one though, unfortunately.Menstrual
I don't understand your question. Mintty is the default terminal for Cygwin. What do you think is the default terminal, or what are you using for a default? Also, how did you install q?Surroundings
Thanks for the feedback, @pak. I've edited the question to clarify... by "default terminal" what I really meant was "cmd". I installed q the typical way (download from kx and unzip).Mercurochrome
Does q still work despite the lack of a prompt? Frankly, I don't know the answer. You might try asking on the Kdb+ Personal Developers forum and posting back here if you get an answer.Surroundings
Thanks, @pak. It works somewhat, but the prompt can contain valuable debugging context, so it's hobbled at best. Thanks for the suggestion about the forum.Mercurochrome
N
2

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)
Nonparticipation answered 8/1, 2018 at 9:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.