Giter VIP home page Giter VIP logo

selecth's Introduction

This is a port of Gary Bernhardt's Selecta from Ruby to Haskell. Selecta a fuzzy text selector in the vein of CtrlP or Command-T, but is an editor independant unix tool that can filter anything from stdin. See Selecta's README for keybindings, suggested uses, the scoring algorithm, and other info.

Installation

If you're on a 64 bit processor, you can download the binary from http://curtis.io/downloads/selecth.html. For Haskell users, it should be available on Hackage once I get upload permissions.

Then just place it on your path and you're good to go. See Selecta's readme for more on how to do this if you don't know how.

Differences from Selecta

  • Selecth calls "stty sane" to restore your terminal from raw mode, rather than setting it to its previous state. This hasn't been a problem for me, I don't imagine it will be for you, but fixing this is on my TODO list.
  • It's a native executable with no Ruby dependency.
  • It uses relative positioning rather than always placing your cursor at the bottom of the window after use.
  • Selecth is faster (3-6x), particularly for searching thousands of lines
    • Haskell's single threaded performance is solid, but it will score searches of more than 1000 lines in parallel.
    • Checkout this beautiful report generated by Bryan O'Sullivan amazing Criterion.
    • Selecta's times for the same benchmarks on my machine:
      • non-matching: 0.003015629
      • matching exactly: 0.028580932
      • matching broken up: 0.029262051
      • overlapping matches: 0.087831839
      • words, non-matching: 0.192346901
      • words, matching: 0.20814989

selecth's People

Contributors

cgag avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.