Lightweight GNU readline alternative


punekr12 :

I am looking for a GNU readline alternative. It has many features but only a few of them worked for me as described below -

I am developing an interactive command prompt application (displays the prompt and accepts the next user command to run). I want to implement some editing and history functionality for prompts. So when the user presses the UP key, it should show the last run command. Likewise, if the user needs to edit any typos or command switches etc, they should be able to navigate using the arrow keys.

Something similar already exists on Windows, if you use fgetsor scanfget input at the cmd prompt, it already maintains a history and can also be edited.

Is there a good alternative on Linux?

G. I quote :

I think it's an admirable goal :-)

Maybe Linenoise , libedit/editline or tecla fit the bill?

Of these libedit is probably the most widely used - such as the postgreqsql client shell and various BSD utilities for Kerberos ntp(although for upstream sources it may not be the default line editing library due to the widespread use of libreadline on Linux). If you read some of these references and research further, you'll find that libedit/editline has slightly different versions.

Cheers and good luck with your project.

Related


Lightweight GNU readline alternative

punekr12 : I am looking for a GNU readline alternative. It has many features but only a few of them worked for me as described below - I am developing an interactive command prompt application (displays the prompt and accepts the next user command to run). I w

Lightweight GNU readline alternative

punekr12 I am looking for a GNU readline alternative. It has many features but only a few of them worked for me as described below - I am developing an interactive command prompt application (displays the prompt and accepts the next user command to run). I wan

Lightweight GNU readline alternative

punekr12 : I am looking for a GNU readline alternative. It has many features but only a few of them worked for me as described below - I am developing an interactive command prompt application (displays the prompt and accepts the next user command to run). I w

Lightweight alternative to Hibernate?

Jared: I have a user Java program that wants to store data in a lightweight database such as Derby or Sqlite. I want to use a data abstraction layer in my program. Hibernate seems to require a lot of configuration and is overkill for what I need. What is a lig

Lightweight alternative dock

Alex: Generally , Jetty is known as a lightweight alternative when it comes to servlet containers like Tomcat and App Servers like Glassfish . I want to run a RESTful service on CloudFoundry. use jetty java -jar target/dependency/jetty-runner.jar target/*.war

Lightweight multilingual alternative to JMX?

ROM1: I have a software real-time application project that requires extensive monitoring. JMX seems to be a good fit for the task, it's just that the application project is based on c++. Is there a lightweight alternative to JMX (with a c/c++ support library)

Lightweight alternative dock

Alex: Generally , Jetty is known as a lightweight alternative when it comes to servlet containers like Tomcat and App Servers like Glassfish . I want to run a RESTful service on CloudFoundry. use jetty java -jar target/dependency/jetty-runner.jar target/*.war

Lightweight alternative to Hibernate?

Jared: I have a user Java program that wants to store data in a lightweight database such as Derby or Sqlite. I want to use a data abstraction layer in my program. Hibernate seems to require a lot of configuration and is overkill for what I need. What is a lig

A clean, lightweight alternative to Python?

jkp : One (a long time ago) I wrote a web spider and I multithreaded the thread to allow concurrent requests to happen at the same time. That was my Python youth, before I learned about the GIL and its associated troubles for multithreaded code (IE, most of th

Lightweight multilingual alternative to JMX?

ROM1: I have a software real-time application project that requires extensive monitoring. JMX seems to be a good fit for the task, it's just that the application project is based on c++. Is there a lightweight alternative to JMX (with a c/c++ support library)

Lightweight zxcvbn alternative?

Greg Blass Wondering if there are any lightweight zxcvbn alternatives out there. I don't need my password strength meter to be incredible - rather, I need to reduce the size of my assets. Can someone say 80% of the content? Maybe not the whole dictionary in th

Lightweight alternative dock

Alex Generally , Jetty is known as a lightweight alternative when it comes to servlet containers like Tomcat and App Servers like Glassfish . I want to run a RESTful service on CloudFoundry. use jetty java -jar target/dependency/jetty-runner.jar target/*.war

Lightweight alternative to Hibernate?

Jared: I have a user Java program that wants to store data in a lightweight database such as Derby or Sqlite. I want to use a data abstraction layer in my program. Hibernate seems to require a lot of configuration and is overkill for what I need. What is a lig

Lightweight alternative dock

Alex: Generally , Jetty is known as a lightweight alternative when it comes to servlet containers like Tomcat and App Servers like Glassfish . I want to run a RESTful service on CloudFoundry. use jetty java -jar target/dependency/jetty-runner.jar target/*.war

A clean, lightweight alternative to Python?

jkp : One (a long time ago) I wrote a web spider and I multithreaded the thread to allow concurrent requests to happen at the same time. That was my Python youth, before I learned about the GIL and its associated troubles for multithreaded code (IE, most of th

Lightweight multilingual alternative to JMX?

ROM1: I have a software real-time application project that requires extensive monitoring. JMX seems to be a good fit for the task, it's just that the application project is based on c++. Is there a lightweight alternative to JMX (with a c/c++ support library)

A clean, lightweight alternative to Python?

jkp : One (a long time ago) I wrote a web spider and I multithreaded the thread to allow concurrent requests to happen at the same time. That was my Python youth, before I learned about the GIL and its associated troubles for multithreaded code (IE, most of th

How to install GNU Readline?

Josh Pinto Basically every question. I have the .tar.gzfile but can't seem to install it. I did the whole thing ./configureand makeit make installdidn't work. Anwar You can install it by using the command in the terminal (press install Ctrl- Altpackage-- T). s

How to install GNU Readline?

Josh Pinto Basically every question. I have the .tar.gzfile but can't seem to install it. I did the whole thing ./configureand makeit make installdidn't work. Anwar You can install it by using the command in the terminal (press install Ctrl- Altpackage-- T). s

Lightweight alternative to fork() in POSIX C?

Kyle From the man pages I'm reading, it seems that popen, system, etc. tend to call fork(). In turn, fork() copies the entire memory state of the process. This does seem like a lot of work, especially in many cases where the child calling fork() barely has any

Is there a (lightweight) alternative to `rxvt-unicode`?

Buffalo I am currently rxvt-unicodeusing as a terminal emulator. Since I also like the configurability of GNOME and KDE's terminal emulators, I'm wondering if there is some sort of alternative that can replace GNOME or KDE Terminal, but rxvt-unicodewith more f

Lightweight alternative to fork() in POSIX C?

Kyle From the man pages I'm reading, it seems that popen, system, etc. tend to call fork(). In turn, fork() copies the entire memory state of the process. This does seem like a lot of work, especially in many cases where the child calling fork() barely has any

Is there a (lightweight) alternative to `rxvt-unicode`?

Buffalo I am currently rxvt-unicodeusing as a terminal emulator. Since I also like the configurability of GNOME and KDE's terminal emulators, I'm wondering if there is some sort of alternative that can replace GNOME or KDE Terminal, but rxvt-unicodewith more f

Lightweight alternative to fork() in POSIX C?

Kyle From the man pages I'm reading, it seems that popen, system, etc. tend to call fork(). In turn, fork() copies the entire memory state of the process. This does seem like a lot of work, especially in many cases where the child calling fork() barely has any

Lightweight alternative to fork() in POSIX C?

Kyle From the man pages I'm reading, it seems that popen, system, etc. tend to call fork(). In turn, fork() copies the entire memory state of the process. This does seem like a lot of work, especially in many cases where the child calling fork() barely has any

Is there a (lightweight) alternative to `rxvt-unicode`?

Buffalo I am currently rxvt-unicodeusing as a terminal emulator. Since I also like the configurability of GNOME and KDE's terminal emulators, I'm wondering if there is some sort of alternative that would replace GNOME or KDE Terminal, but rxvt-unicodewith more

C++ wrapper to GNU Readline

haywa I'm trying to write a c++ wrapper for GNU Readline to be able to use custom completion easily, but I'm running into a small problem and can't think of a solution (I'm pretty new to c++). class ReadLine { public: ReadLine(); ~ReadLine(); st