On Wednesday, 9 September 2015 at 01:35:26 UTC, Joel wrote:
auto line = terminal.getline("your prompt: ");
Huh, that should work unless your terminal is outrageously narrow
or maybe output starting on the right side of the screen already.
But I can't look much further without having a
Maybe you can try gnu readline instead:
extern(C) char* readline(const(char)* prompt);
pragma(lib, "readline");
pragma(lib, "curses");
void main() {
auto line = readline("your line: ");
import std.stdio, std.conv;
writeln(to!string(line));
}
On Wednesday, 9 September 2015 at 17:47:44 UTC, Adam D. Ruppe
wrote:
Maybe you can try gnu readline instead:
extern(C) char* readline(const(char)* prompt);
pragma(lib, "readline");
pragma(lib, "curses");
void main() {
auto line = readline("your line: ");
import std.stdio,
On Wednesday, 9 September 2015 at 21:27:05 UTC, Joel wrote:
Thanks Adam. That works better than normal. Up and down don't
work though.
There's another function called add_history for that. Readline is
a pretty popular library (also GPL though, keep that in mind if
you distribute your
On Friday, 4 September 2015 at 03:31:40 UTC, Adam D. Ruppe wrote:
On Friday, 4 September 2015 at 02:17:57 UTC, Joel wrote:
In Mac OS, when typing with readln etc. I can't use the cursor
keys. Works in Windows though.
That's normal, line editing on Unix terminals is a kinda
advanced library
Or just take it from the man page:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/signal.3.html
On 9/8/15 9:20 AM, Adam D. Ruppe wrote:
On Tuesday, 8 September 2015 at 13:17:31 UTC, Ola Fosheim Grøstad wrote:
Or just take it from the man page:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/signal.3.html
ah excellent. My web search came up with
On Tuesday, 8 September 2015 at 13:17:31 UTC, Ola Fosheim Grøstad
wrote:
Or just take it from the man page:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/signal.3.html
ah excellent. My web search came up with
On Tuesday, 8 September 2015 at 13:02:35 UTC, Adam D. Ruppe wrote:
On Tuesday, 8 September 2015 at 06:24:12 UTC, Joel wrote:
arsd/terminal.d(1268): Error: undefined identifier 'SIGWINCH'
There's a missing value in the signal header for OSX !
Could you run this little C program for me on
On Tuesday, 8 September 2015 at 13:20:20 UTC, Adam D. Ruppe wrote:
On Tuesday, 8 September 2015 at 13:17:31 UTC, Ola Fosheim
Grøstad wrote:
Or just take it from the man page:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/signal.3.html
ah excellent. My
On Wed, Sep 09, 2015 at 12:05:52AM +, Joel via Digitalmars-d-learn wrote:
> Now I get the error:
What is your code calling the function? The prompt might
just be too long.
On Wednesday, 9 September 2015 at 00:44:57 UTC, via
Digitalmars-d-learn wrote:
On Wed, Sep 09, 2015 at 12:05:52AM +, Joel via
Digitalmars-d-learn wrote:
Now I get the error:
What is your code calling the function? The prompt might just
be too long.
import terminal;
void main() {
On Tuesday, 8 September 2015 at 06:24:12 UTC, Joel wrote:
arsd/terminal.d(1268): Error: undefined identifier 'SIGWINCH'
There's a missing value in the signal header for OSX !
Could you run this little C program for me on your Mac and let me
know the output?
---
#include
#include
int
In Mac OS, when typing with readln etc. I can't use the cursor
keys. Works in Windows though.
On Friday, 4 September 2015 at 02:17:57 UTC, Joel wrote:
In Mac OS, when typing with readln etc. I can't use the cursor
keys. Works in Windows though.
That's normal, line editing on Unix terminals is a kinda advanced
library feature. The most common lib to do it, GNU readline, is
actually a
15 matches
Mail list logo