Questions tagged [libreadline]

The Gnu readline library is used by other programs, such as shells and interpreters, to provide common line-editing capabilities.

83 questions
2
votes
1 answer

No line history / autocomplete available in python REPL

I downloaded and compiled Python 3.7 from source on a Debian machine, however the 'readline' functionality (viewing line history, tab to autocomplete) is missing. I have the python3.5 package which was installed using apt, and the functionality…
Frayt
  • 1,194
  • 2
  • 17
  • 38
2
votes
2 answers

Bash autocomplete an option without running the application

I have found this code as a bash autocomplete. But, it looks strange to me. What if I do not like to run the code at all. If I would like to type ./a.out then space (without entering) and then by pressing tab, I would like to see only two options…
ar2015
  • 5,558
  • 8
  • 53
  • 110
2
votes
1 answer

Why readline does not unset `backward-delete-char`?

I need to bind the code 127 (aka DEL, aka ^?) to delete-char. If I put DEL: delete-char to ~/.inputrc, it does not work. This is because this code is used by backward-delete-char by default. So, first I need to free this code from…
Igor Liferenko
  • 1,499
  • 1
  • 13
  • 28
2
votes
0 answers

Telling GNU readline to autoquote/autoescape file names like bash does

I'm adding readline support for a program with an interactive shell. I've found some great examples online like this one but I'm having trouble telling readline to automatically expand file names with \␣ when the file name has a whitespace. The blog…
Pablo
  • 13,271
  • 4
  • 39
  • 59
2
votes
1 answer

Readline & NCurses, handle special keys and keys combinations

I'm replicating an Irssi interface for a student project. I would like to use NCurses for the text interface, and readline to provide better text-editing capabilities while writing messages. This question, answer and project provided me with a great…
Antonin Décimo
  • 499
  • 3
  • 17
2
votes
1 answer

Prevent readline line submit

I'm using readline in an application that follows the input realtime. I don't want to allow the user to press Enter, Control + J, or any other equivalent, and thus unintentionally clearing the field. I'm actually forwarding the keys myself, so I can…
vise
  • 12,713
  • 11
  • 52
  • 64
2
votes
1 answer

Bash and readline: how to bind key to a "silent command" of my own in bash?

What I want to do is simple: add a keybinding to one of my program using readline startup file inputrc but, in addition, as my program does not produce any output, I do not want the command name to appear on stdout. What my problem is: .inputrc…
Alexkag
  • 21
  • 2
2
votes
1 answer

GNU Readline: Is there a function that cancels readline input request?

I'm new to GNU Readline, so I want to know if there exist a function that can cancel readline() request?
Ikbel
  • 7,721
  • 3
  • 34
  • 45
2
votes
1 answer

readline() internal buffer

Using GNU Readline: The function readline() displays prompt and reads user's input. Can I modify its internal buffer? and how to achieve that? #include #include int main() { char* input; //…
Ikbel
  • 7,721
  • 3
  • 34
  • 45
2
votes
2 answers

Link go program vs GNU readline statically

I'm writing a Go program that uses the GNU readline library for a fancy command line interface. In order to simplify the installing process and not worry about the library version and other stuff, I want to link it statically. The problem is I don't…
Topo
  • 4,783
  • 9
  • 48
  • 70
1
vote
2 answers

GNU Readline (libreadline): Displaying output message asynchronously

While using readline (blocking) for user input, I would like to output lines of text to the console asynchronously from another thread. Further, I would like that the readline prompt and current partial input line be removed from the console, the…
Andrew Tomazos
  • 66,139
  • 40
  • 186
  • 319
1
vote
1 answer

How to fix: gawk: error while loading shared libraries: libreadline.so.4: cannot open shared object file: No such file or directory

I was running make and encountered the following error: gawk: error while loading shared libraries: libreadline.so.4: cannot open shared object file: No such file or directory config.status: error: could not create mjson.pc Reaping losing child…
li_jessen
  • 49
  • 6
1
vote
0 answers

libreadline is not exiting on Ctrl+C from paginated "__more__" output state (possible completions on tab)

My application uses libreadline to auto complete timezone strings (on pressing tab) for timezone command. As there are lot of possible completions the output is paginated with __more__. In this state if I press q it exits fine but if I press Ctrl+C…
Harish Reddy
  • 65
  • 1
  • 6
1
vote
3 answers

Tab Completion in C (readline library)

I have been trying to get tab completion working.. I am very confused and don't know what to do. Could you please take a look at my code and tell me how I could possibly fix it. By the way I used rl_attempted_completion_function since I got it from…
MattD
  • 35
  • 1
  • 3
1
vote
1 answer

How fix error of loading libreadline.so.6 after to run R?

I tried to install R using conda as follows: (base) [root@localhost ~]# conda install -c r r After the installation was completed, I tried to run R, and unfortunately, I face following error: $ R /opt/miniconda3/lib/R/bin/exec/R: error while loading…
Ehsan
  • 53
  • 1
  • 7