Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
95 views

I'm writing a simple REPL for a language with rustyline, and I'm trying to support multiline input using ^J. How do I get rustyline to display a read-only continuation prompt while inserting a ...
quintuple-mallard's user avatar
-3 votes
1 answer
99 views

I'm new learning rust and this is an issue with BufReader.read_line(). In the official documentation it says "This function will read bytes from the underlying stream until the newline delimiter (...
Sun Shuo's user avatar
0 votes
1 answer
95 views

I'm going through Build your own shell, and I've got to the task of implementing command completion. A note suggests: We recommend using a library like readline for your implementation. Most modern ...
Enlico's user avatar
  • 30.3k
3 votes
3 answers
245 views

I need to process 100 Gigabytes of logs in a weird format, then do some analysis on the results. Initial parts of parsing and CLI done, tried on some test data with 1 GB and it took around a minute. I ...
nemo nemo's user avatar
1 vote
0 answers
92 views

I have been writing a simple REPL application in C. One of the required features was syntax highlighting so I wrote my own rl_redisplay function that allows me to highlight the test using ANSI escape ...
Natrome tex's user avatar
1 vote
1 answer
138 views

So I have this really weird issue where I have the following dummy.php script: <?php declare(strict_types=1); $prompt = "Hello there!". PHP_EOL . "What do you want to know?"...
DevelJoe's user avatar
  • 1,552
0 votes
0 answers
98 views

I'm working with Node.js (ESM .mjs file) on macOS terminal. My printing logic is: Start printing from the current top line in the terminal downward. Continuously add new lines (Hello, world! ) in ...
Mango's user avatar
  • 123
0 votes
1 answer
90 views

I want to asynchronously process keyboard events in a Node.js application. It was recommended to me to use readline.emitKeypressEvents which leads to code like this: import readline from "node:...
kayahr's user avatar
  • 22.3k
0 votes
1 answer
170 views

My .inputrc file, which simply contains set editing-mode vi, means that when I use Bash and some other interpretive environments, I can use Vi editor keys. This also works when I run the system Python ...
Michael Scheper's user avatar
0 votes
3 answers
97 views

I am using Vim bindings in bash (set -o vi) and I wanted to know if it is possible to use and save Vim macros on the command line. For instance, I would like to save a macro like this: let @q = "...
armando's user avatar
  • 1,508
1 vote
3 answers
152 views

Any suggestions where this huge time difference results from when reading the same large text file by the same loop from inside a class in Python. import timeit fn = "some-large-file.txt" ...
user1491229's user avatar
0 votes
3 answers
133 views

from sys import argv script, input_file = argv hello = open(input_file) read1 = hello.readline() print("Line1: ", read1, end = "") line1 = len(read1) + 1 print(line1) read2 = ...
Govind Sharma's user avatar
3 votes
2 answers
235 views

Problem I'm working with asynchronous code in Rust and trying to handle user input from stdin in a cancel-safe manner. My goal is to be able to detect when a user presses a key (or hits enter) to ...
bitchwhocodes's user avatar
1 vote
0 answers
125 views

I just hate it so much when small things that were working since forever suddenly break. I use MINGW64 bash in Windows Terminal in Windows 10. When I run gdb-multiarch, inside it, suddenly Backspace ...
sdbbs's user avatar
  • 5,958
2 votes
2 answers
149 views

I'm using linenoise with a c command line style program. The standard way of using linenoise is to do a simple char* line; line = linenoise("prompt: "); // Use the line in the app free(...
Mark S.'s user avatar
  • 77
2 votes
1 answer
107 views

I am writing a Go wrapper that does various things and then executes an interactive bash shell. I would like to usurp FD2 of this child process with my own thing that is fed in from the Go wrapper. ...
J M's user avatar
  • 203
1 vote
1 answer
182 views

I am trying to get readline to exit when I press ctrl-c. I thought I could do this with rl_done but it is not working. Upon pressing ctrl-c I am getting these debug statements: start readline setting ...
Clément's user avatar
  • 101
1 vote
0 answers
31 views

This code as it is opens the browser and read a txt file line by line: line 1 line 2 line 3 Stream closed The thing I don't understand is why placing const browser = await puppeteer....
daego's user avatar
  • 329
0 votes
1 answer
84 views

I am migrating a working application on a Raspberry Pi to the latest OS Bookworm. On make, I get the following error: make clang++ -lpthread -L/usr/local/lib –lreadline -lcurl -lpigpio -o build/...
ADL's user avatar
  • 119
0 votes
1 answer
84 views

I am attempting to create a vignette in R Markdown for a package that I have created. Within one of these R functions, it has a readline() requiring user input to confirm continuing an analysis based ...
rachelgriffard's user avatar
3 votes
0 answers
77 views

I've got a strange issue with TypeScript when trying to use the readline to create an interface reading the console window. From what I can tell, process.stdin returns a ReadStream whilst ...
James Richardson's user avatar
2 votes
1 answer
129 views

While developing a line editor in C++, I'm using getch() to capture each key input, and see \r(13 in ASCII) as the Enter key. However, when pasting text that contains multiple lines, the program ...
caozhanhao's user avatar
0 votes
1 answer
82 views

I have a string that needs to be read using the Scanner class from the beginning to the \n character. The problem is that the source stream in my case may contain the character \u2028. I know that the ...
Smetana Po Aktsii's user avatar
1 vote
1 answer
143 views

Bash provides facilities to modify an entire line and change the position of the cursor with commands bound to bind -x through READLINE_LINE and READLINE_POINT variables: $ cat test.sh #!/bin/bash ...
Andriy Sultanov's user avatar
2 votes
2 answers
113 views

I have the following signal handler established: void sig_handler(int sig) { if (sig == SIGINT) { printf("\n"); rl_on_new_line(); rl_replace_line("&...
user39350's user avatar
0 votes
1 answer
54 views

I developed a basic memcache get and set implementation in c#. When i run a test, everything works as expected, when the test is run on another machine than the memcache server. When i run the same ...
Dryzler's user avatar
  • 17
1 vote
0 answers
100 views

I'm using the python readline module (and using the input() function, which readline modifies). Everything is working, but I would like to add a feature to call a custom python function when a ...
user1806566's user avatar
  • 1,241
0 votes
1 answer
636 views

Using Renci SSH.NET, I am trying to send a simple command to an ethernet switch over ssh, and then to read the response back from the switch. I can connect to the switch but it just hangs when I call ...
DavidJ's user avatar
  • 1
0 votes
0 answers
52 views

I'm writing a script that asks for multiple user inputs using the command: readline(prompt = "Question here") My first attempt at the beginning of the script works correctly. I'm asking for ...
Keegan's user avatar
  • 65
0 votes
0 answers
126 views

I am currently running R code on a server in the background with nohup in the following way: nohup R --no-save < Rscriptname.R &> out & I need to make some small changes to the script ...
Ev09's user avatar
  • 21
1 vote
1 answer
68 views

I stumbled across what should be something simple that's turned out to be a brain-teaser. As a not fully accomplished BASH programmer, I naively thought I could read in characters from an interactive ...
Richard T's user avatar
  • 4,695
-1 votes
1 answer
130 views

I’m working on a project where I need to log real-time data from a weigh scale into an Excel sheet. The catch is that the data should only be logged when I click a specific cell in the Excel sheet. ...
Kojo Olivet's user avatar
6 votes
2 answers
2k views

Bun.js has a nice native API to read periodical user input: const prompt = "Type something: "; process.stdout.write(prompt); for await (const line of console) { console.log(`You typed: ${...
Mir-Ismaili's user avatar
  • 17.7k
0 votes
0 answers
28 views

Am trying to echo a line variable along with another variable like below while read -r line;do id1=$(echo "$line"|grep...) id2=`grep "$id1"...." echo "$line" , "...
sabarish tr's user avatar
0 votes
2 answers
70 views

So the purpose of the code is to import JSON questions and read them to the user in the terminal. The user gets 5 seconds to answer the question until the next question is displayed. The issue I am ...
jroo14's user avatar
  • 9
2 votes
1 answer
916 views

I have this code: import sys binfile = "data.hex" print("Paste ascii encoded data.") line = sys.stdin.readline() b = bytes.fromhex(line) with open(binfile, "wb") as fp:...
Bart Friederichs's user avatar
0 votes
1 answer
126 views

My tool appends little json blocks with comma at their end into a txt file which initially has [ as the first character, in order to create a whole JSON format text file, like below, {data: text1}, ...
blueway's user avatar
  • 139
1 vote
4 answers
179 views

UPDATE: The root problem has been solved by fixing a number of Sequelize migrations that always run before mysqldump is called, as discussed in the comments that are below the article that is linked ...
steven_noble's user avatar
  • 4,213
0 votes
1 answer
71 views

I'm working on implementing a server in Java to handle a multiplayer Minesweeper game. In trying to test my server to ensure that it responds correctly to legal client requests, I am finding that the ...
Coder1913's user avatar
1 vote
0 answers
115 views

When I'm in Python and use the arrow keys I see the escape characters: (e.g. ^[[A^[[B^[[C^[[A^[[D). I want to just have the up arrow key go to last entry. So, my question is whether there's an ...
Miss Understood's user avatar
1 vote
0 answers
114 views

Is there any way (supported or otherwise) to set Readline's rl_readline_name variable from Ruby's Readline module? Or even to read it to find out the current value? It seems to be only marginally ...
RoUS's user avatar
  • 2,030
0 votes
0 answers
58 views

I'm trying to use the user input on a readline question, to display it in front of the question after the user hits enter. Currently i have a promisified question like this: export const ...
Leandro Melo's user avatar
1 vote
0 answers
62 views

When using bash, if you run bind 'TAB:menu-complete' readline will cycle through all the possible matches. However I can't find a way to do the same in a C program that uses readline for input. The ...
td211's user avatar
  • 235
0 votes
1 answer
87 views

In python3 it seems that there is a bug with the readline() method. I have a file txt.txt that contains two lines: 1234567890 abcdefghij I then run the following code: g = open("txt.txt",&...
DCR's user avatar
  • 15.8k
0 votes
0 answers
155 views

I am writing an app with streaming text output that needs to have an input area fixed to the bottom of the screen. I am using node:readline and ansi-escapes and I just cannot figure out how to ...
logikal's user avatar
  • 1,141
1 vote
3 answers
309 views

How to convert following simple Fortran to Julia? integer n,i,ne,m,k(10,2) real x(10),a(10) open(1,'t.txt') READ(1,*) n,ne do i=1,n READ(1,*) m,x(m) end do do i=1,ne READ(1,*) m,a(m),(k(m,...
computationalMechanics's user avatar
1 vote
1 answer
41 views

My aim is to: Copy emacs-standard and emacs-meta keymaps, Activate the copies Make changes to the copies Restore the emacs-standard and emacs-meta keymaps I have read that emacs-meta is assigned to ...
Joel Roth's user avatar
0 votes
1 answer
173 views

Here is my code in Node.JS const fs = require('fs'); const readline = require('readline'); const filePath = 'the/path/to/the/file'; const linesPerChunk = 20; const readStream = fs....
Chapo's user avatar
  • 2,663
0 votes
0 answers
146 views

I'm writing a shell-like program in C using GNU readline and have encountered a bug related to prompt handling. Brief Description of the Issue In my program, after exiting a heredoc with ^D and then ...
kemizuki's user avatar
0 votes
1 answer
338 views

I am designing a console app in Node.js using readline to control the cursor positions and get user input. Here is a library I have written for the same: // ReadLine.js const readline = require("...
Himanshu Agrawal's user avatar

1
2 3 4 5
46