• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

examples/H03-Dec-2020-739611

include/H03-Dec-2020-1,176502

src/H03-Dec-2020-7,2335,714

.appveyor.ymlH A D03-Dec-2020251 1211

.editorconfigH A D03-Dec-2020102 96

.gitignoreH A D03-Dec-2020149 1414

.travis.ymlH A D03-Dec-2020205 1514

LICENSE.mdH A D03-Dec-20202.7 KiB6448

README.mdH A D03-Dec-20203.1 KiB12087

build-all.shH A D03-Dec-20202.1 KiB9481

gen-coverage.shH A D03-Dec-2020651 2314

make.ps1H A D03-Dec-20202 KiB8171

replxx-config.cmake.inH A D03-Dec-202074 42

tests.pyH A D03-Dec-202083.5 KiB2,0302,012

README.md

1# Read Evaluate Print Loop ++
2
3![demo](https://drive.google.com/uc?export=download&id=0B53g2Y3z7rWNT2dCRGVVNldaRnc)
4
5[![Build Status](https://travis-ci.org/AmokHuginnsson/replxx.svg?branch=master)](https://travis-ci.org/AmokHuginnsson/replxx)
6
7A small, portable GNU readline replacement for Linux, Windows and
8MacOS which is capable of handling UTF-8 characters. Unlike GNU
9readline, which is GPL, this library uses a BSD license and can be
10used in any kind of program.
11
12## Origin
13
14This replxx implementation is based on the work by
15[ArangoDB Team](https://github.com/arangodb/linenoise-ng) and
16[Salvatore Sanfilippo](https://github.com/antirez/linenoise) and
1710gen Inc.  The goal is to create a zero-config, BSD
18licensed, readline replacement usable in Apache2 or BSD licensed
19programs.
20
21## Features
22
23* single-line and multi-line editing mode with the usual key bindings implemented
24* history handling
25* completion
26* syntax highlighting
27* hints
28* BSD license source code
29* Only uses a subset of VT100 escapes (ANSI.SYS compatible)
30* UTF8 aware
31* support for Linux, MacOS and Windows
32
33It deviates from Salvatore's original goal to have a minimal readline
34replacement for the sake of supporting UTF8 and Windows. It deviates
35from 10gen Inc.'s goal to create a C++ interface to linenoise. This
36library uses C++ internally, but to the user it provides a pure C
37interface that is compatible with the original linenoise API.
38C interface.
39
40## Requirements
41
42To build this library, you will need a C++11-enabled compiler and
43some recent version of CMake.
44
45## Build instructions
46
47### *nix
48
491. Create a build directory
50
51```bash
52mkdir -p build && cd build
53```
54
552. Build the library
56
57```bash
58cmake -DCMAKE_BUILD_TYPE=Release .. && make
59```
60
613. Install the library at the default target location
62
63```bash
64sudo make install
65```
66
67The default installation location can be adjusted by setting the `DESTDIR`
68variable when invoking `make install`:
69
70```bash
71make DESTDIR=/tmp install
72```
73
74### Windows
75
761. Create a build directory in MS-DOS command prompt
77
78```
79md build
80cd build
81```
82
832. Generate Visual Studio solution file with cmake
84
85* 32 bit:
86```bash
87cmake -G "Visual Studio 12 2013" -DCMAKE_BUILD_TYPE=Release ..`
88```
89* 64 bit:
90```bash
91`cmake -G "Visual Studio 12 2013 Win64" -DCMAKE_BUILD_TYPE=Release ..`
92```
93
943. Open the generated file `replxx.sln` in the `build` subdirectory with Visual Studio.
95
96## Tested with...
97
98 * Linux text only console ($TERM = linux)
99 * Linux KDE terminal application ($TERM = xterm)
100 * Linux xterm ($TERM = xterm)
101 * Linux Buildroot ($TERM = vt100)
102 * Mac OS X iTerm ($TERM = xterm)
103 * Mac OS X default Terminal.app ($TERM = xterm)
104 * OpenBSD 4.5 through an OSX Terminal.app ($TERM = screen)
105 * IBM AIX 6.1
106 * FreeBSD xterm ($TERM = xterm)
107 * ANSI.SYS
108 * Emacs comint mode ($TERM = dumb)
109 * Windows
110
111Please test it everywhere you can and report back!
112
113## Let's push this forward!
114
115Patches should be provided in the respect of linenoise sensibility for
116small and easy to understand code that and the license
117restrictions. Extensions must be submitted under a BSD license-style.
118A contributor license is required for contributions.
119
120