Skip to content

mattn/cho

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
November 18, 2020 00:55
October 16, 2020 12:04
March 24, 2023 08:04
September 21, 2021 03:43
June 3, 2016 01:04
March 24, 2023 08:02
March 24, 2023 08:02
March 24, 2023 08:04

cho

choice!

cho

Why cho?

Why not choice? Because Windows already have choice command.

Why not choic? Too long

Why not choi? Still long

Then, cho? Sound good to me

Usage

Just like peco

Installation

$ go get github.com/mattn/cho

Usecase

Linux

FOO=`ls | cho`

Windows

for /f "delims=;" %%i in ('ls ^| cho') do set FOO=%%i

Keys

Key Behavior
CTRL-N Next
CTRL-P Previous
Enter Decide
CTLR-A Left side on prompt
CTLR-E Right side on prompt
CTRL-V Select in multi mode
CTRL-U Clear prompt
ESC Cancel

License

MIT

Author

Yasuhiro Matsumoto (a.k.a mattn)