Skip to content

raahii/peco.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

peco.py (WIP)

demo.gif

This is a python prompt tool that enables users to select a choice(line) by filtering interactively like peco. This package is not a CLI tool.

You can easily use this by passing list of choices in your python code like following:

from peco import Peco

def alphabets():
    return [chr(ord("A") + i) for i in range(26)]

dummy_choices = alphabets()
selected_choice = Peco(dummy_choices).run()

print("selected:", selected_choice)
# >> selected: D

TODO:

  • highlight line correctly
  • paging
  • separate label and value from choices argument

About

A python package of filtering tool like peco

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages