Questions tagged [readline]

A library for command line editing, or a function to read one line of text.

Readline may refer either the GNU readline library, used for editing a command line; or a function or method in various programming languages which typically reads a line of text from an open file handle.

GNU readline library

The gnu readline library provides applications with an interactive command prompt with features like

  • flexible command editing
  • configurable key bindings to mimic e.g. or
  • a history of past commands

Probably the most prominent application using readline is . Both packages are maintained by the same person. Many programming languages provide bindings for this library.

readline function

Examples of readline functions or methods include

(please extend this list if you know more languages using this name)

2233 questions
9
votes
8 answers

Rails server giving Readline support error

I'm new to Ruby on Rails and I'm trying to start the RoR server. But when I run the command rails server it gives me the following error: Sorry, you can't use byebug without Readline. To solve this, you need to rebuild Ruby with Readline…
Abraar Arique Diganto
  • 1,215
  • 16
  • 24
9
votes
1 answer

Accessing command history in QPython console for Android

Is it possible to access previously entered commands in QPython's console/REPL? Up and down arrows just display escape sequences. I tried switching the Terminal type option between screen, linux, and vt100, but this doesn't seem to help. A related…
intuited
  • 23,174
  • 7
  • 66
  • 88
9
votes
2 answers

Node.js readline missing last line of file?

I'm trying to read a text file asynchronously and line-by-line under Node.js. I have the following CoffeeScript code: readline = require 'readline' fs = require…
flow
  • 3,624
  • 36
  • 48
9
votes
2 answers

How do I compile Readline support into Ruby

My version of ruby was compiled with editline (on os x) and I miss the features of readline in irb. How do I recompile ruby with readline support?
samg
  • 3,496
  • 1
  • 25
  • 26
8
votes
3 answers

Colorized output breaks linewrapping with readline

I'm working with colorizing some output using readline in Ruby, but I am not having any luck getting line wrapping to work properly. For example: "\e[01;32mThis prompt is green and bold\e[00m > " The desired result would be: This prompt is green…
Eugene
  • 4,829
  • 1
  • 24
  • 49
8
votes
0 answers

Python: bind a function to a key

I just started learning python and am writing my own tab-completion function for practice/fun (so no one tell me to us rlcompleter). I'm having some trouble getting actually get the python to call the function though. My code: import readline def…
Trcx
  • 4,164
  • 6
  • 30
  • 30
8
votes
5 answers

Need to pick up line terminators with StreamReader.ReadLine()

I wrote a C# program to read an Excel .xls/.xlsx file and output to CSV and Unicode text. I wrote a separate program to remove blank records. This is accomplished by reading each line with StreamReader.ReadLine(), and then going character by…
Tony Trozzo
  • 1,231
  • 6
  • 20
  • 34
8
votes
4 answers

Using readline in Node.js

I'm trying to use readline inside an else if statement: var rl = readline.createInterface({ input: process.stdin, output: process.stdout }); rl.question("Would you like to see which cars are available? Please type yes/no: ",…
Sara
  • 85
  • 1
  • 1
  • 5
8
votes
2 answers

python 3.6 crash after install readline

I have python 3.6 installed from source code. And because up arrow key is not working, I installed readline module by 'pip install readline' But after this, my python console crash. *** glibc detected *** python: free(): invalid pointer: 0xb7506578…
etlds
  • 5,810
  • 2
  • 23
  • 30
8
votes
2 answers

How do I properly reference the GNU readline library to scan terminal input?

I am attempting to compile C code that utilizes the following within GNU readline. #include ; #include ; I've tried changing the <> to "" and compiling both with and without the -lreadline options. Nothing…
XBigTK13X
  • 2,655
  • 8
  • 30
  • 39
8
votes
1 answer

Adding Readline Functionality Without Recompiling Python

I recently upgraded to Ubuntu 10.04 LTS and refreshed my Python environment. I installed Python 2.7 from source. Unfortunately, I didn't notice that Setup.dist has the readline line commented out by default - by default, there is no readline…
Brighid McDonnell
  • 4,293
  • 4
  • 36
  • 61
8
votes
3 answers

How to let putty change its cursor shape accordingly?

When I use putty to log on to a bash shell, I want it like real term emulator in Linux. That means: If I set shell to vi editing mode, the cursor would be a vertical line in inserting mode, and a block in a command mode. How can I do this? Thanks…
haohaolee
  • 677
  • 1
  • 9
  • 16
8
votes
2 answers

Simple node.js readline on the console

I'd like to teach students how to program using JavaScript. I don't want to introduce new students to call-backs or any other complex program structure. Looking at Node.js the readline used for standard input uses a call-back. For simple input data,…
Paul Vincent Craven
  • 2,027
  • 3
  • 19
  • 24
8
votes
2 answers

How to suggest files with tab completion using readline?

Within the Bash shell, I can use tab-completion to use suggest file and directory names. How can I achieve this with nodejs and readline? Examples: / should suggest /root/, /bin/, etc. /et should complete to /etc/. fo should complete…
Lekensteyn
  • 64,486
  • 22
  • 159
  • 192
8
votes
3 answers

Python readline module prints escape character during import

I am using the readline module with Python 2.7.3 with Fedora 17. I do not have this problem with Ubuntu 12.10. During import readline, an escape char is displayed. $ python -c 'import readline' |less ESC[?1034h(END) Usually when I get unexpected…
Alex
  • 181
  • 1
  • 4