Giter Site home page Giter Site logo

cpp-readline's Introduction

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 ..
make

The 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.

cpp-readline's People

Contributors

svalorzen avatar zmij avatar prior99 avatar jktjkt avatar dzhioev avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.