Skip to content

Add Linenoise support to the CLI.

Jeremy Sowden netfilter-devel 2 versions Applied

Status from this message: Applied, thanks Jeremy.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 6 repliesApplied
  2. v13 patches 1 replySuperseded

Changes in v2 from the cover letter

* dropped the linenoise source from the nftables tree and added an AC_CHECK_LIB check instead.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2cli: add linenoise CLI implementation.configure.ac include/cli.h src/cli.c +1 more+71 -164 replies
2/2main: add more information to `nft -v`.src/Makefile.am src/main.c+29 -20 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPhil Sutter
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH nftables v2 0/2] Add Linenoise support to the CLI.

Sebastian Priebe [0] requested Linenoise support for the CLI as an alternative to Readline, so I thought I'd have a go at providing it. Linenoise is a minimal, zero-config, BSD licensed, Readline replacement used in Redis, MongoDB, and Android [1].

0 - https://lore.kernel.org/netfilter-devel/[email protected]/
1 - https://github.com/antirez/linenoise/

By default, the CLI continues to be build using Readline, but passing --with-cli=linenoise instead causes Linenoise to be used instead.

nft -v has been extended to display what CLI implementation was built and whether mini-gmp was used.

Changes since v1:

* dropped the linenoise source from the nftables tree and added an AC_CHECK_LIB check instead.

Changes since RFC:

* two tidy-up patches dropped because they have already been applied;
* source now added to include/ and src/;
* tests/build/run-tests.sh updated to test --with-cli=linenoise;
* nft -v extended.

Jeremy Sowden (2):
cli: add linenoise CLI implementation.
main: add more information to nft -v.

 configure.ac             | 17 ++++++++---
 include/cli.h            |  2 +-
 src/Makefile.am          |  3 ++
 src/cli.c                | 64 ++++++++++++++++++++++++++++++++++------
 src/main.c               | 28 ++++++++++++++++--
 tests/build/run-tests.sh |  4 +--
 6 files changed, 100 insertions(+), 18 deletions(-)
Signature · 1 line
2.23.0