Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clecta

Build Status

This is yet another port of 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, 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

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
  • 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 Widegreen

Distributed under the BSD-Clause-2 License, see LICENSE.

Bitdeli Badge

About

C++ port of garybernhardt/selecta

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages