Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/awidegreen/clecta
C++ port of garybernhardt/selecta
https://github.com/awidegreen/clecta
c-plus-plus selecta
Last synced: 17 days ago
JSON representation
C++ port of garybernhardt/selecta
- Host: GitHub
- URL: https://github.com/awidegreen/clecta
- Owner: awidegreen
- License: bsd-2-clause
- Created: 2014-12-11T22:51:29.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-04T21:24:45.000Z (over 9 years ago)
- Last Synced: 2023-03-13T14:42:44.112Z (almost 2 years ago)
- Topics: c-plus-plus, selecta
- Language: C++
- Homepage:
- Size: 1.17 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clecta
[![Build Status](https://travis-ci.org/awidegreen/clecta.svg?branch=master)](https://travis-ci.org/awidegreen/clecta)
This is yet another port of [garybernhardt/selecta](https://github.com/garybernhardt/selecta) in C++ using Ncurses for the terminal window. UTF-8 is supported.
Despite the fact that there are already a whole lot of selecta alternatives ([fzf](https://github.com/junegunn/fzf), [icepick](https://github.com/felipesere/icepick)),
I decided to write a clone to further explore C++11 (e.g. threads).
In addition, I have never done anything with ncurses before.### Some features
* highlight matching string in match list
* switch case sensitivity for search `F2`
* multiple matchers (Simple string matcher, CmdT matcher): `F3`
* status-line shows some stats about the candidates
* resize support
* depending on the hardware, matching algorithm is executed concurrent![Demo](https://raw.github.com/awidegreen/clecta/master/demo.gif)
### Keys
* `Home` go to the beginning match list
* `End` go to the beginning match list
* `F2` toggle case-sensitivity
* `F3` switch the matcher
* `Arrow-Up` and `Arrow-Down` for selecting string from match list
* `^U` Empty search term
* `^N` alias for `Arrow-Down`
* `^P` alias for `Arrow-Up`### to be done
* move matcher in its own (static) library
* ability to load matcher via a library (plugin)
* add more key bindings, see [readline](https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29#Keyboard_shortcuts)
* `cmake` installation target
* make coloring adjustable (via config file)### Examples
```
# Use find to get a list of all files, use clecta to select the desired file which shall be opened with vim
vim $(find . | clecta)
```### Dependencies
* Ncurses### Installation
```
git clone https://github.com/awidegreen/clecta
mkdir clecta/build
cd clecta/build
cmake ..
make
# or use: make -j`nproc`
```
### Tests
In the build directory, use:
* the *test* target: `make test` or
* run the tests manually: `tests/clecta-tests`### License
Copyright (c) Armin WidegreenDistributed under the BSD-Clause-2 License, see LICENSE.
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/awidegreen/clecta/trend.png)](https://bitdeli.com/free "Bitdeli Badge")