lix's fork of replxx, for local patches and infrequent maintenance
  • C++ 59.6%
  • Python 32.8%
  • C 5.3%
  • CMake 1.3%
  • Shell 0.6%
  • Other 0.4%
Find a file
2021-11-25 11:18:58 +01:00
.github/workflows Add integration with GitHub Actions. 2021-10-11 15:17:45 +02:00
examples Add history_move_{next/prevoius} 2021-11-19 16:18:28 +01:00
include Add HISTORY_SEEDED_INCREMENTAL_SEARCH action. 2021-11-25 11:18:58 +01:00
src Add HISTORY_SEEDED_INCREMENTAL_SEARCH action. 2021-11-25 11:18:58 +01:00
.appveyor.yml Rename appveyor.yml -> .appveyor.yml 2019-11-20 12:56:06 +01:00
.editorconfig Reset version to mark old API. 2018-03-01 02:03:32 +01:00
.gitignore .gitignore: Ignore test artifacts. 2021-11-24 13:24:28 +01:00
.travis.yml travis: Update distro used for tests. cmake: Fix version test. 2019-11-15 05:07:07 +01:00
build-all.sh build-all: Allow auto builds with older version (14) of MSVCXX. 2020-11-28 11:40:50 +01:00
CMakeLists.txt ReplxxImpl: Kill to begining of line instead of begining of buffer on CTRL-u on multiline inputs. 2021-10-15 01:22:42 +02:00
gen-coverage.sh ♻️ Refactor CMake to be more modernized 2019-11-15 04:49:47 +01:00
LICENSE.md Fix issues reported by valgrind. 2018-01-07 23:30:27 +01:00
make.ps1 Add powershell based build script. 2020-03-10 20:39:23 +01:00
README.md README: Cleanup readme file. 2021-11-10 15:52:32 +01:00
replxx-config.cmake.in ♻️ Refactor CMake to be more modernized 2019-11-15 04:49:47 +01:00
tests.py Add HISTORY_SEEDED_INCREMENTAL_SEARCH action. 2021-11-25 11:18:58 +01:00

Read Evaluate Print Loop ++

demo

Build Status

A small, portable GNU readline replacement for Linux, Windows and MacOS which is capable of handling UTF-8 characters. Unlike GNU readline, which is GPL, this library uses a BSD license and can be used in any kind of program.

Origin

This replxx implementation is based on the work by ArangoDB Team and Salvatore Sanfilippo and 10gen Inc. The goal is to create a zero-config, BSD licensed, readline replacement usable in Apache2 or BSD licensed programs.

Features

  • single-line and multi-line editing mode with the usual key bindings implemented
  • history handling
  • completion
  • syntax highlighting
  • hints
  • BSD license source code
  • Only uses a subset of VT100 escapes (ANSI.SYS compatible)
  • UTF8 aware
  • support for Linux, MacOS and Windows

Requirements

To build this library, you will need a C++11-enabled compiler and some recent version of CMake.

Build instructions

*nix

  1. Create a build directory
mkdir -p build && cd build
  1. Build the library
cmake -DCMAKE_BUILD_TYPE=Release .. && make
  1. Install the library at the default target location
sudo make install

The default installation location can be adjusted by setting the DESTDIR variable when invoking make install:

make DESTDIR=/tmp install

Windows

  1. Create a build directory in MS-DOS command prompt
md build
cd build
  1. Generate Visual Studio solution file with cmake
  • 32 bit:
cmake -G "Visual Studio 12 2013" -DCMAKE_BUILD_TYPE=Release ..
  • 64 bit:
cmake -G "Visual Studio 12 2013 Win64" -DCMAKE_BUILD_TYPE=Release ..
  1. Open the generated file replxx.sln in the build subdirectory with Visual Studio.

Tested with...

  • Linux text only console ($TERM = linux)
  • Linux KDE terminal application ($TERM = xterm)
  • Linux xterm ($TERM = xterm)
  • Linux Buildroot ($TERM = vt100)
  • Mac OS X iTerm ($TERM = xterm)
  • Mac OS X default Terminal.app ($TERM = xterm)
  • OpenBSD 4.5 through an OSX Terminal.app ($TERM = screen)
  • IBM AIX 6.1
  • FreeBSD xterm ($TERM = xterm)
  • ANSI.SYS
  • Emacs comint mode ($TERM = dumb)
  • Windows

Please test it everywhere you can and report back!