Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

How to integrate command history with the Autocomplete method of the Questionary library?

So I am trying to take user input using questionary's questionary.autocomplete() function. I would like for a command history to be present to navigate through it using the up and down arrow keys, ...
LuckyCoder3607's user avatar
0 votes
1 answer
31 views

R markdown and readline()

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
1 vote
0 answers
19 views

process.stdin is not recognized as ReadableStream when using readline.createInterface

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
1 vote
1 answer
59 views

How to detect the Enter key when pasting multi-line text (containing `\r`)?

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
66 views

Scanner.readLine() with custom line delimeter

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
129 views

Is it possible to modify the entire line and display autocompletion suggestions in a single go in bash?

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
1 answer
45 views

How can I properly reprint a readline prompt on SIGINT?

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
19 views

Memcache SET command does not work on localhost but from remote machine

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
0 votes
0 answers
37 views

Is there a way in python's readline module to bind a key to a custom function?

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,211
0 votes
1 answer
109 views

Renci SSH.NET hangs on simple command and response

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
42 views

Why isn't my R script pausing when I ask for a prompt?

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
  • 25
0 votes
0 answers
67 views

How can I pass input to an R script being run with nohup?

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
  • 1
1 vote
1 answer
48 views

How do I catch return characters when using character-at-a-time BASH builtin read with if or a case statement?

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,660
-1 votes
1 answer
61 views

Live Data from a Scale

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
4 votes
2 answers
520 views

How can I read a single line user input with Bun.js?

Bun.js has a useful 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
  • 16.3k
0 votes
0 answers
26 views

Trying to echo line variable along with another variable inside a while read loop

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
0 answers
29 views

QuartoDocument input

I'm not sure how to word it because I haven't been able to find stuff on it, but I want to make a data.frame() that will use an initial input value that you can put into a prompt box on my website, ...
TheNautical_Sailor's user avatar
0 votes
2 answers
61 views

Having an asynchronous issue with my JavaScript code when using a timeout with Node.js

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
384 views

How can I read more than 4096 bytes from stdin, copy-pasted to a terminal on Linux?

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
77 views

Edit the final part of large(1.5gb) text file in NodeJS

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
  • 131
1 vote
4 answers
148 views

text file -- how to sort adjacent lines that have the same level of indentation

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,205
0 votes
1 answer
48 views

Why do my Java server tests pass when I add a System.out.println(in.readLine()) statement before the tests, but fail without that statement?

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
0 votes
0 answers
70 views

How can I get rid of seeing escape characters in Python3.12?

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
106 views

Accessing Readline's "application name" in Ruby

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
  • 1,980
0 votes
0 answers
33 views

Reprint readline question after user input

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
0 votes
0 answers
59 views

How to let the readline() function run correctly within r markdown document, and keep messaging on screen functiona?

I'm making a user friendly pipeline to analyze flow cytometry data, which means we have a user friendly main document, and a depenencies file in which all the horror of a code is standing. Because ...
Anne's user avatar
  • 1
1 vote
0 answers
32 views

Make readline tab cycle options within a C application

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
  • 148
0 votes
1 answer
69 views

Python readline() bug, writes at eof

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.5k
0 votes
0 answers
55 views

Use ansi escape sequences to create a border between input and output

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
0 votes
0 answers
37 views

I created multiple threads in nodejs, and used readline's rl.question method in the threads, but it did not achieve the effect I wanted

I want to implement multiple threads to execute the code separately, but I will use rl.question to input some information through the command line. According to my thinking, when each thread executes ...
shadow's user avatar
  • 1
1 vote
3 answers
214 views

Julia, read data from text file (Fortran- like)

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
37 views

readline: activating copies of both emacs-standard and emacs-meta keymaps

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
143 views

Why is my 'await' line not working as expected?

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,523
0 votes
0 answers
75 views

Remanent prompt staying in a readline history when using rl_add_history

I am currently recreating a mini version of bash in C. I am having troubles with the readline function: when I type a pipe command such as cat /etc/os-release | grep ubuntu I have some characters that ...
Théo ZANCHI's user avatar
0 votes
0 answers
98 views

Extra Prompt Displayed in GNU Readline

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
170 views

Problem in controlling cursor position through readline in Node.js

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
0 votes
1 answer
34 views

C-W is deleting my command prompt - how to stop this

I'm working on a small shell and using libreadline to get command input. problem My command prompt is getting deleted when I use C-W note this only happens after I enter a word and then C-W, C-w ...
amdixon's user avatar
  • 3,835
0 votes
0 answers
142 views

Why does COMP_WORDBREAKS exists? What are usefull cases for using COMP_WORDBREAKS?

Many confused programmers stumbled upon COMP_WORDBREAKS. The documentation states https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html : COMP_WORDBREAKS The set of characters that ...
KamilCuk's user avatar
  • 137k
0 votes
0 answers
492 views

Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'ReadLine')

When launching the app.js, there is an error written above, here is an example of the code const SerialPort = require('serialport'); const Readline = SerialPort.parsers.ReadLine; const port = new ...
mr. chaplin's user avatar
0 votes
0 answers
134 views

How to take a text file line by line as the input of the gpt2's generate method and save its output to another text file?

I want to generate text using gpt2 after fine-tunning and I want to use a text file as the input for the generate function of the model however not reading it as a one text block but line by line. At ...
Alaeddine's user avatar
1 vote
1 answer
88 views

How to move the cursor on the editing line with cl-readline

I am trying to learn how to use cl-readline. One thing I want to do is bind the "(" key to a function, which inserts "()" and move the cursor between the two characters. I actually ...
xiepan's user avatar
  • 773
0 votes
0 answers
31 views

Pythonista 3 cannot recognize line breaks

import sys print(sys.stdin.readline()) 1 2 3 When I run the code above with the values above on pythonista 3, it doesn’t recognize line breaks and the output appears as follows 1 2 3 I expected ...
dalmutimelange's user avatar
1 vote
0 answers
100 views

How to handle error in readline nodej module

I have a simple script reading file one by line. const fs = require('node:fs'); const readline = require('node:readline'); const rl = readline.createInterface({ input: fs.createReadStream('file-...
Chestnykh Oleksii's user avatar
1 vote
4 answers
199 views

Elixir: Behaviour of Backspace in iex

I'm using Elixir 1.15.0 with Erlang/OTP 26 on Arch Linux. I haven't configured anything; I'm just using the default setup. When I type the following code in IEx: i <- [1, 2, 3], j <- [10, 20, 30]...
Patrick Bucher's user avatar
0 votes
1 answer
83 views

How can I reinitialize the readline module in Python?

In my python program I need to catch the WINCH signal like this: def WinResize(num, stack): # DO SOME STUFF HERE signal.signal(signal.SIGWINCH, WinResize) The problem is that readline doesn't ...
chrislamp's user avatar
0 votes
0 answers
13 views

How to stop my WCF server readline thread?

recently I implemented a pipe server which can be connected by multi clients. there is a readline function in the server thread to keep reading the messages sent from the connected client. When the ...
Peng Jun's user avatar
1 vote
0 answers
60 views

Trying to execute piped commands that are taken from a readline function

I am doing a project for my school in C, which consists of building a minishell, a small version of Shell. I already have done all the parsing and can execute single commands. However, when I try to ...
nobody really's user avatar
1 vote
1 answer
73 views

Which is better? Integer.valueOf(readLine()) or readLine()!!.toInt()

I am learning Kotlin using codeacademy. In the Madlibs project I was asked to read an number input using readLine() from the user and then convert it to an integer. I want to know which of the two ...
G Sekyere's user avatar
2 votes
0 answers
96 views

How to statically link readline when using mingw on Linux?

I made a small CLI tool that uses readline() for completion and powerful editing capabilities. On Linux, I can use the dynamic library easily by including it as a dependency in the package manager. On ...
td211's user avatar
  • 148
0 votes
1 answer
122 views

Node.js process/readline on keypress listener prevents the app from ever ending on its own

I'm trying to: write a simple awaitable async function for a TUI node.js app that waits for a single key press on the keyboard (without having to press Enter after) and returns info about the key ...
LaVache's user avatar
  • 2,589

1
2 3 4 5
46