Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Svalorzen/cpp-readline
A very simple C++ wrapper for GNU readline.
https://github.com/Svalorzen/cpp-readline
c-plus-plus cpp-readline gnu-readline readline-library
Last synced: 2 months ago
JSON representation
A very simple C++ wrapper for GNU readline.
- Host: GitHub
- URL: https://github.com/Svalorzen/cpp-readline
- Owner: Svalorzen
- License: gpl-3.0
- Created: 2014-03-03T22:46:32.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-08-19T15:54:37.000Z (over 7 years ago)
- Last Synced: 2024-08-02T01:25:39.558Z (6 months ago)
- Topics: c-plus-plus, cpp-readline, gnu-readline, readline-library
- Language: C++
- Size: 29.3 KB
- Stars: 58
- Watchers: 5
- Forks: 19
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
cpp-readline
============This is a very simple library that wraps GNU readline into a C++ reusable class,
hiding all the global state of the readline library. It is meant to help you
interface really easily with your programs, while waiting for a more powerful
solution (or improving this library itself for your needs).Features
========The main features of this library are:
- Easy adding of custom commands
- Automatic completion of commands and filenames.
- Can run files containing lists of commands automatically.
- Multiple separate Consoles can be run at the same time, bypassing the readline
library global state.
- Currently NOT thread-safe.Requirements
============The library currently requires support for C++11, and, of course, the readline
library.Building
========This repository includes a very simple makefile to build the provided example,
but since the library is a single class you can simply include it directly into
your project and compile it with the rest, without creating a library file.Otherwise the repository also has supporto for CMake, if you need to integrate
that with your existing build. To build the project using CMake, just do the
following in the project root directory:mkdir build
cd build
cmake ..
makeThe makefile default compiler is g++, if you are using a different compiler
simply change the parameters to suit you (or compile manually, it's really just
three files).Usage
=====This library's usage can easily be seen in the file `example/main.cpp`.