Code Monkey home page Code Monkey logo

peco's Introduction

peco

Simplistic interactive filtering tool

NOTE: If you are viewing this on GitHub, this document refers to the state of peco in whatever current branch you are viewing, not necessarily the state of a currently released version. Please make sure to checkout the Changes file for features and changes.

This README is long and comprehensive. Use the Table of Contents to navigate to the section that interests you. It has been placed at the bottom of the README file because of its length.

If you use peco, please consider sponsoring the authors of this project from the "Sponsor" button on the project page at https://github.com/peco/peco. Sponsorship plans start at $1 :)

Description

peco (pronounced peh-koh) is based on a python tool, percol. percol was darn useful, but I wanted a tool that was a single binary, and forget about python. peco is written in Go, and therefore you can just grab the binary releases and drop it in your $PATH.

peco can be a great tool to filter stuff like logs, process stats, find files, because unlike grep, you can type as you think and look through the current results.

For basic usage, continue down below. For more cool elaborate usage samples, please see the wiki, and if you have any other tricks you want to share, please add to it!

Demo

Demos speak more than a thousand words! Here's me looking for a process on my mac. As you can see, you can page through your results, and you can keep changing the query:

Executed ps -ef | peco, then the query root was typed. This shows all lines containing the word root

Here's me trying to figure out which file to open:

Executed find . -name '*.go' | peco (within camlistore repository), then the query camget was typed. This shows all lines including the word camget

When you combine tools like zsh, peco, and ghq, you can make managing/moving around your huge dev area a piece of cake! (this example doesn't use zsh functions so you can see what I'm doing)

Executed cd $(ghq list --full-path | peco --query peco) to show all repositories containing the word peco, then to change directories into the one selected

Features

Incremental Search

Search results are filtered as you type. This is great to drill down to the line you are looking for

Multiple terms turn the query into an "AND" query:

Executed ps aux | peco, then the query root app was typed. This shows all lines containing both root and app

When you find that line that you want, press enter, and the resulting line is printed to stdout, which allows you to pipe it to other tools

Select Multiple Lines

You can select multiple lines! (this example uses C-Space)

Executed ls -l | peco, then used peco.ToggleSelection to select multiple lines

Select Range Of Lines

Not only can you select multiple lines one by one, you can select a range of lines (Note: The ToggleRangeMode action is not enabled by default. You need to put a custom key binding in your config file)

Executed ps -ef | peco, then used peco.ToggleRangeMode to select a range of lines

Select Filters

Different types of filters are available. Default is case-insensitive filter, so lines with any case will match. You can toggle between IgnoreCase, CaseSensitive, SmartCase, Regexp and Fuzzy filters.

The SmartCase filter uses case-insensitive matching when all of the queries are lower case, and case-sensitive matching otherwise.

The Regexp filter allows you to use any valid regular expression to match lines.

The Fuzzy filter allows you to find matches using partial patterns. For example, when searching for ALongString, you can enable the Fuzzy filter and search ALS to find it. The Fuzzy filter uses smart case search like the SmartCase filter. With the FuzzyLongestSort flag enabled in the configuration file, it does a smarter match. It sorts the matched lines by the following precedence: 1. longer substring, 2. earlier (left positioned) substring, and 3. shorter line.

Executed ps aux | peco, then typed google, which matches the Chrome.app under IgnoreCase filter type. When you change it to Regexp filter, this is no longer the case. But you can type (?i)google instead to toggle case-insensitive mode

Selectable Layout

As of v0.2.5, if you would rather not move your eyes off of the bottom of the screen, you can change the screen layout by either providing the --layout=bottom-up command line option, or set the Layout variable in your configuration file

Executed ps -ef | peco --layout=bottom-up to toggle inverted layout mode

Works on Windows!

I have been told that peco even works on windows :) Look ma! I'm not lying!

Showing peco running on Windows cmd.exe

Installation

Just want the binary?

Go to the releases page, find the version you want, and download the zip file. Unpack the zip file, and put the binary to somewhere you want (on UNIX-y systems, /usr/local/bin or the like). Make sure it has execution bits turned on. Yes, it is a single binary! You can put it anywhere you want :)

THIS IS THE RECOMMENDED WAY (except for macOS homebrew users)

macOS (Homebrew, Scarf)

If you're on macOS and want to use homebrew:

brew install peco

or with Scarf:

scarf install peco

Debian and Ubuntu based distributions (APT, Scarf)

There is an official Debian package that can be installed via APT:

apt install peco

or with Scarf:

scarf install peco

Void Linux (XBPS)

xbps-install -S peco

Arch Linux

There is an official Arch Linux package that can be installed via pacman:

pacman -Syu peco

Windows (Chocolatey NuGet Users)

There's a third-party peco package available for Chocolatey NuGet.

C:\> choco install peco

Building peco yourself

Make sure to clone the source code under $GOPATH (i.e. $GOPATH/src/github.com/peco/peco). This is required as the main binary refers to an internal package, which requires that the source code be located in the correct package location.

Navigate to the directory above, then run:

make build

This will do the following:

  1. Run go build to create releases/$VERSION_NUMBER/peco

You can copy the binary to somewhere in your $PATH, and it should just work.

The above installs the correct versions of peco's dependencies. Then build it:

go build cmd/peco/peco.go

This compiles a peco binary in the root of the cloned peco repository. Copy this file to an appropriate location.

go get IS NOT RECOMMENDED

Please DO NOT use go get to install this tool. It bypasses the developers' intention of controlling the dependency versioning.

Command Line Options

-h, --help

Display a help message

--version

Display the version of peco

--query

Specifies the default query to be used upon startup. This is useful for scripts and functions where you can figure out beforehand what the most likely query string is.

--print-query

When exiting, prints out the query typed by the user as the first line of output. The query will be printed even if there are no matches, if the program is terminated normally (i.e. enter key). On the other hand, the query will NOT be printed if the user exits via a cancel (i.e. esc key).

--rcfile

Pass peco a configuration file, which currently must be a JSON file. If unspecified it will try a series of files by default. See Configuration File for the actual locations searched.

-b, --buffer-size

Limits the buffer size to num. This is an important feature when you are using peco against a possibly infinite stream, as it limits the number of lines that peco holds at any given time, preventing it from exhausting all the memory. By default the buffer size is unlimited.

--null

WARNING: EXPERIMENTAL. This feature will probably stay, but the option name may change in the future.

Changes how peco interprets incoming data. When this flag is set, you may insert NUL ('\0') characters in your input. Anything before the NUL character is treated as the string to be displayed by peco and is used for matching against user query. Anything after the NUL character is used as the "result": i.e., when peco is about to exit, it displays this string instead of the original string displayed.

Here's a simple example of how to use this feature

--initial-index

Specifies the initial line position upon start up. E.g. If you want to start out with the second line selected, set it to "1" (because the index is 0 based).

--initial-filter IgnoreCase|CaseSensitive|SmartCase|Regexp|Fuzzy

Specifies the initial filter to use upon start up. You should specify the name of the filter like IgnoreCase, CaseSensitive, SmartCase, Regexp and Fuzzy. Default is IgnoreCase.

--prompt

Specifies the query line's prompt string. When specified, takes precedence over the configuration file's Prompt section. The default value is QUERY>.

--layout top-down|bottom-up

Specifies the display layout. Default is top-down, where query prompt is at the top, followed by the list, then the system status message line. bottom-up changes this to the list first (displayed in reverse order), the query prompt, and then the system status message line.

For percol users, --layout=bottom-up is almost equivalent of --prompt-bottom --result-bottom-up.

--select-1

When specified and the input contains exactly 1 line, peco skips prompting you for a choice, and selects the only line in the input and immediately exits.

If there are multiple lines in the input, the usual selection view is displayed.

--on-cancel success|error

Specifies the exit status to use when the user cancels the query execution. For historical and back-compatibility reasons, the default is success, meaning if the user cancels the query, the exit status is 0. When you choose error, peco will exit with a non-zero value.

--selection-prefix string

When specified, peco uses the specified prefix instead of changing line color to indicate currently selected line(s). default is to use colors. This option is experimental.

--exec string

When specified, peco executes the specified external command (via shell), with peco's currently selected line(s) as its input from STDIN.

Upon exiting from the external command, the control goes back to peco where you can keep browsing your search buffer, and to possibly execute your external command repeatedly afterwards.

To exit out of peco when running in this mode, you must execute the Cancel command, usually the escape key.

Configuration File

peco by default consults a few locations for the config files.

  1. Location specified in --rcfile. If this doesn't exist, peco complains and exits
  2. $XDG_CONFIG_HOME/peco/config.json
  3. $HOME/.config/peco/config.json
  4. for each directory listed in $XDG_CONFIG_DIRS, $DIR/peco/config.json
  5. If all else fails, $HOME/.peco/config.json

Below are configuration sections that you may specify in your config file:

Global

Global configurations that change the global behavior.

Prompt

You can change the query line's prompt, which is QUERY> by default.

{
    "Prompt": "[peco]"
}

InitialMatcher

InitialMatcher has been deprecated. Please use InitialFilter instead.

InitialFilter

Specifies the filter name to start peco with. You should specify the name of the filter, such as IgnoreCase, CaseSensitive, SmartCase, Regexp and Fuzzy.

FuzzyLongestSort

Enables the longest substring match and sorts the output. It affects only the Fuzzy filter.

Default value for FuzzyLongestSort is false.

StickySelection

{
    "StickySelection": true
}

StickySelection allows selections to persist even between changes to the query. For example, when you set this to true you can select a few lines, type in a new query, select those lines, and then delete the query. The result is all the lines that you selected before and after the modification to the query are left intact.

Default value for StickySelection is false.

OnCancel

{
    "OnCancel": "error"
}

OnCancel is equivalent to --on-cancel command line option.

MaxScanBufferSize

{
    "MaxScanBufferSize": 256
}

Controls the buffer sized (in kilobytes) used by bufio.Scanner, which is responsible for reading the input lines. If you believe that your input has very long lines that prohibit peco from reading them, try increasing this number.

The same time, the default MaxScanBuferSize is 256kb.

Keymaps

Example:

{
    "Keymap": {
        "M-v": "peco.ScrollPageUp",
        "C-v": "peco.ScrollPageDown",
        "C-x,C-c": "peco.Cancel"
    }
}

Key sequences

As of v0.2.0, you can use a list of keys (separated by comma) to register an action that is associated with a key sequence (instead of a single key). Please note that if there is a conflict in the key map, the longest sequence always wins. So In the above example, if you add another sequence, say, C-x,C-c,C-c, then the above peco.Cancel will never be invoked.

Combined actions

As of v0.2.1, you can create custom combined actions. For example, if you find yourself repeatedly needing to select 4 lines out of the list, you may want to define your own action like this:

{
    "Action": {
        "foo.SelectFour": [
            "peco.ToggleRangeMode",
            "peco.SelectDown",
            "peco.SelectDown",
            "peco.SelectDown",
            "peco.ToggleRangeMode"
        ]
    },
    "Keymap": {
        "M-f": "foo.SelectFour"
    }
}

This creates a new combined action foo.SelectFour (the format of the name is totally arbitrary, I just like to put namespaces), and assigns that action to M-f. When it's fired, it toggles the range selection mode and highlights 4 lines, and then goes back to waiting for your input.

As a similar example, a common idiom in emacs is that C-c C-c means "take the contents of this buffer and accept it", whatever that means. This adds exactly that keybinding:

{
    "Action": {
        "selectAllAndFinish": [
            "peco.SelectAll",
            "peco.Finish"
        ]
    },
    "Keymap": {
        "C-c,C-c": "selectAllAndFinish"
    }
}

Available keys

Since v0.1.8, in addition to values below, you may put a M- prefix on any key item to use Alt/Option key as a mask.

Name Notes
C-a ... C-z Control + whatever character
C-2 ... C-8 Control + 2..8
C-[
C-]
C-~
C-_
C-\\ Note that you need to escape the backslash
C-/
C-Space
F1 ... F12
Esc
Tab
Enter
Insert
Delete
BS
BS2
Home
End
Pgup
Pgdn
ArrowUp
ArrowDown
ArrowLeft
ArrowRight
MouseLeft
MouseMiddle
MouseRight

Key workarounds

Some keys just... don't map correctly / too easily for various reasons. Here, we'll list possible workarounds for key sequences that are often asked for:

You want this Use this instead Notes
Shift+Tab M-[,Z Verified on macOS

Available actions

Name Notes
peco.ForwardChar Move caret forward 1 character
peco.BackwardChar Move caret backward 1 character
peco.ForwardWord Move caret forward 1 word
peco.BackwardWord Move caret backward 1 word
peco.BackToInitialFilter Switch to first filter in the list
peco.BeginningOfLine Move caret to the beginning of line
peco.EndOfLine Move caret to the end of line
peco.EndOfFile Delete one character forward, otherwise exit from peco with failure status
peco.DeleteForwardChar Delete one character forward
peco.DeleteBackwardChar Delete one character backward
peco.DeleteForwardWord Delete one word forward
peco.DeleteBackwardWord Delete one word backward
peco.InvertSelection Inverts the selected lines
peco.KillBeginningOfLine Delete the characters under the cursor backward until the beginning of the line
peco.KillEndOfLine Delete the characters under the cursor until the end of the line
peco.DeleteAll Delete all entered characters
peco.RefreshScreen Redraws the screen. Note that this effectively re-runs your query
peco.SelectPreviousPage (DEPRECATED) Alias to ScrollPageUp
peco.SelectNextPage (DEPRECATED) Alias to ScrollPageDown
peco.ScrollPageDown Moves the selected line cursor for an entire page, downwards
peco.ScrollPageUp Moves the selected line cursor for an entire page, upwards
peco.SelectUp Moves the selected line cursor to one line above
peco.SelectDown Moves the selected line cursor to one line below
peco.SelectPrevious (DEPRECATED) Alias to SelectUp
peco.SelectNext (DEPRECATED) Alias to SelectDown
peco.ScrollLeft Scrolls the screen to the left
peco.ScrollRight Scrolls the screen to the right
peco.ScrollFirstItem Scrolls to the first item (in the entire buffer, not the current screen)
peco.ScrollLastItem Scrolls to the last item (in the entire buffer, not the current screen)
peco.ToggleSelection Selects the current line, and saves it
peco.ToggleSelectionAndSelectNext Selects the current line, saves it, and proceeds to the next line
peco.ToggleSingleKeyJump Enables SingleKeyJump mode a.k.a. "hit-a-hint"
peco.SelectNone Remove all saved selections
peco.SelectAll Selects the all line, and save it
peco.SelectVisible Selects the all visible line, and save it
peco.ToggleSelectMode (DEPRECATED) Alias to ToggleRangeMode
peco.CancelSelectMode (DEPRECATED) Alias to CancelRangeMode
peco.ToggleQuery Toggle list between filtered by query and not filtered.
peco.ToggleRangeMode Start selecting by range, or append selecting range to selections
peco.CancelRangeMode Finish selecting by range and cancel range selection
peco.RotateMatcher (DEPRECATED) Use peco.RotateFilter
peco.RotateFilter Rotate between filters (by default, ignore-case/no-ignore-case)
peco.Finish Exits from peco with success status
peco.Cancel Exits from peco with failure status, or cancel select mode

Default Keymap

Note: If in case below keymap seems wrong, check the source code in keymap.go (look for NewKeymap).

Key Action
Esc peco.Cancel
C-c peco.Cancel
Enter peco.Finish
C-f peco.ForwardChar
C-a peco.BeginningOfLine
C-b peco.BackwardChar
C-d peco.DeleteForwardChar
C-e peco.EndOfLine
C-k peco.KillEndOfLine
C-u peco.KillBeginningOfLine
BS peco.DeleteBackwardChar
C-8 peco.DeleteBackwardChar
C-w peco.DeleteBackwardWord
C-g peco.SelectNone
C-n peco.SelectDown
C-p peco.SelectUp
C-r peco.RotateFilter
C-t peco.ToggleQuery
C-Space peco.ToggleSelectionAndSelectNext
ArrowUp peco.SelectUp
ArrowDown peco.SelectDown
ArrowLeft peco.ScrollPageUp
ArrowRight peco.ScrollPageDown

Styles

For now, styles of following 5 items can be customized in config.json.

{
    "Style": {
        "Basic": ["on_default", "default"],
        "SavedSelection": ["bold", "on_yellow", "white"],
        "Selected": ["underline", "on_cyan", "black"],
        "Query": ["yellow", "bold"],
        "Matched": ["red", "on_blue"]
    }
}
  • Basic for not selected lines
  • SavedSelection for lines of saved selection
  • Selected for a currently selecting line
  • Query for a query line
  • Matched for a query matched word

Foreground Colors

  • "black" for termbox.ColorBlack
  • "red" for termbox.ColorRed
  • "green" for termbox.ColorGreen
  • "yellow" for termbox.ColorYellow
  • "blue" for termbox.ColorBlue
  • "magenta" for termbox.ColorMagenta
  • "cyan" for termbox.ColorCyan
  • "white" for termbox.ColorWhite
  • "0"-"255" for 256color (Use256Color must be enabled)

Background Colors

  • "on_black" for termbox.ColorBlack
  • "on_red" for termbox.ColorRed
  • "on_green" for termbox.ColorGreen
  • "on_yellow" for termbox.ColorYellow
  • "on_blue" for termbox.ColorBlue
  • "on_magenta" for termbox.ColorMagenta
  • "on_cyan" for termbox.ColorCyan
  • "on_white" for termbox.ColorWhite
  • "on_0"-"on_255" for 256color (Use256Color must be enabled)

Attributes

  • "bold" for fg: termbox.AttrBold
  • "underline" for fg: termbox.AttrUnderline
  • "reverse" for fg: termbox.AttrReverse
  • "on_bold" for bg: termbox.AttrBold (this attribute actually makes the background blink on some platforms/environments, e.g. linux console, xterm...)

CustomFilter

This is an experimental feature. Please note that some details of this specification may change

By default peco comes with IgnoreCase, CaseSensitive, SmartCase, Regexp and Fuzzy filters, but since v0.1.3, it is possible to create your own custom filter.

The filter will be executed via Command.Run() as an external process, and it will be passed the query values in the command line, and the original unaltered buffer is passed via os.Stdin. Your filter must perform the matching, and print out to os.Stdout matched lines. Your filter MAY be called multiple times if the buffer given to peco is big enough. See BufferThreshold below.

Note that currently there is no way for the custom filter to specify where in the line the match occurred, so matched portions in the string WILL NOT BE HIGHLIGHTED.

The filter does not need to be a go program. It can be a perl/ruby/python/bash script, or anything else that is executable.

Once you have a filter, you must specify how the matcher is spawned:

{
    "CustomFilter": {
        "MyFilter": {
            "Cmd": "/path/to/my-matcher",
            "Args": [ "$QUERY" ],
            "BufferThreshold": 100
        }
    }
}

Cmd specifies the command name. This must be searchable via exec.LookPath.

Elements in the Args section are string keys to array of program arguments. The special token $QUERY will be replaced with the unaltered query as the user typed in (i.e. multiple-word queries will be passed as a single string). You may pass in any other arguments in this array. If you omit this in your config, a default value of []string{"$QUERY"} will be used

BufferThreshold specifies that the filter command should be invoked when peco has this many lines to process in the buffer. For example, if you are using peco against a 1000-line input, and your BufferThreshold is 100 (which is the default), then your filter will be invoked 10 times. For obvious reasons, the larger this threshold is, the faster the overall performance will be, but the longer you will have to wait to see the filter results.

You may specify as many filters as you like in the CustomFilter section.

Examples

Layout

See --layout.

SingleKeyJump

{
  "SingleKeyJump": {
    "ShowPrefix": true
  }
}

SelectionPrefix

SelectionPrefix is equivalent to using --selection-prefix in the command line.

{
  "SelectionPrefix": ">"
}

Use256Color

Boolean value that determines whether or not to use 256color. The default is false.

Note: This has no effect on Windows because Windows console does not support extra color modes.

{
    "Use256Color": true
}

FAQ

Does peco work on (msys2|cygwin)?

No. #336 (comment) (Updated Feb 23, 2017: "Maybe" on cygwin #336 (comment))

Non-latin fonts (e.g. Japanese) look weird on my Windows machine...?

Are you using raster fonts? #341

Seeing escape sequences [200~ and [201~ when pasting text?

Disable bracketed paste mode. #417

Hacking

First, fork this repo, and get your clone locally.

  1. Make sure you have go installed, with GOPATH appropriately set
  2. Make sure you have make installed
  3. Run make installdeps (You only need to do this once)

To test, run

make test

To build, run

make build

This will create a peco binary in $(RELEASE_DIR)/peco_$(GOOS)_$(GOARCH)/peco$(SUFFIX). Or, of course, you can just run

go build cmd/peco/peco.go

which will create the binary in the local directory.

TODO

Unit test it.

AUTHORS

  • Daisuke Maki (lestrrat)
  • mattn
  • syohex

CONTRIBUTORS

  • HIROSE Masaaki
  • Joel Segerlind
  • Lukas Lueg
  • Mitsuoka Mimura
  • Ryota Arai
  • Shinya Ohyanagi
  • Takashi Kokubun
  • Yuya Takeyama
  • cho45
  • cubicdaiya
  • kei_q
  • negipo
  • sona_tar
  • sugyan
  • swdyh
  • MURAOKA Taro (kaoriya/koron), for aho-corasick search
  • taichi, for the gif working on Windows
  • uobikiemukot
  • Samuel Lemaitre
  • Yousuke Ushiki
  • Linda_pp
  • Tomohiro Nishimura (Sixeight)
  • Naruki Tanabe (narugit)

Notes

Obviously, kudos to the original percol: https://github.com/mooz/percol Much code stolen from https://github.com/mattn/gof

Table of Contents

peco's People

Contributors

aviaviavi avatar bamchoh avatar bawaaaaah avatar cha147 avatar cho45 avatar cubicdaiya avatar dependabot[bot] avatar dgryski avatar ericfouillet avatar hirose31 avatar hisamura333 avatar k0kubun avatar kei-s avatar lestrrat avatar mattn avatar mineo avatar narugit avatar ncstate-jksnapp avatar negipo avatar puhitaku avatar rhysd avatar sarisia avatar shirayu avatar sixeight avatar skaji avatar syohex avatar tkainrad avatar uobikiemukot avatar youz avatar yuya-takeyama avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

peco's Issues

Grow-up buffers of channel

Currently buffer size of channels are not specified, So it's working synchronized.
How about to grow-up nearly 5?

brewed peco can't resolve ~/.peco/config.json

homebrewでinstallしたpecoだと、~/.peco/config.json を自動で読みに行ってくれないようです。
バージョンは v0.1.9です。

% peco --rcfile ~/.peco/config.json 

のように明示的に指定すれば大丈夫でした。

また、

% go get github.com/peco/peco/cmd/peco
% go build cmd/peco/peco.go

などとした場合は、~/.peco/config.json は自動で読みにいってくれてちゃんと動いていますので、それで使っています。

以下同様の報告です。

Cygwin support?

Hi!

Thank you all for this great tool!

Unfortunately I can't get peco working in the Cygwin Shell (mintty+bash) on Win7 x64.
Both Windows binaries (amd64+386) show the same behaviour:

$ ./peco.exe Changes

-> peco hangs and I have to kill it. :(

Could this maybe fixed with a special Cygwin version of peco?

Multiple action assigning

I want to assign multiple actions in one keymap.

example

{
    "Keymap": {
        "C-c": ["peco.CancelSelectMode", "peco.ResetKeySequence"],
        "C-u": {
            "C-n": ["peco.SelectNext", "peco.SelectNext", "peco.SelectNext", "peco.SelectNext"],
            "C-b": ["peco.SelectPrevious", "peco.SelectPrevious", "peco.SelectPrevious", "peco.SelectPrevious"]
        }
    }
}

peco.ResetKeySequence is not merged actually. But I wanted to do such kind of thing.
And C-u C-n C-u C-b bindings are available in Emacs. C-u means "4 times".

I can implement this by type switching []interface{} in assignKeyHandlers.
But it may cause a hard conflict because key sequence refactoring is working on.
So I did just noticing my feature request.

Automated binary building using drone.io

I've forked this repository and tested automated building using drone.io.

Binaries built from my forked repository is here.

Configuration procedure

  1. Get drone.io account
  2. Select peco/peco project
  3. Copy & paste settings below.

Build Script

Copy & paste below.

export GOROOT=~/go
export PATH=$GOROOT/bin:$PATH

# Download
wget -q https://go.googlecode.com/files/go1.2.1.linux-amd64.tar.gz
tar  -C ~/ -xzf go1.2.1.linux-amd64.tar.gz

# Test
go get ./...
go test ./...

# Setup
pushd $GOROOT/src
GOOS=linux   GOARCH=amd64 ./make.bash --no-clean 2> /dev/null 1> /dev/null
GOOS=darwin  GOARCH=amd64 ./make.bash --no-clean 2> /dev/null 1> /dev/null
GOOS=windows GOARCH=amd64 ./make.bash --no-clean 2> /dev/null 1> /dev/null
popd

# Build
GOOS=linux   GOARCH=amd64 go build -o $GOPATH/bin/linux_amd64/peco cmd/peco/peco.go
GOOS=darwin  GOARCH=amd64 go build -o $GOPATH/bin/darwin_amd64/peco cmd/peco/peco.go
GOOS=windows GOARCH=amd64 go build -o $GOPATH/bin/windows_amd64/peco.exe cmd/peco/peco.go

# Archive
mkdir artifacts
cp -r $GOPATH/bin artifacts

Artifacts

This enables automated distribution of built binaries.
Copy & paste below into Artifacts

artifacts/bin/*/*

Notes

  • URL of Golang compiler is hard-coded.
    So you have to tweak this build script every time you change the compiler version peco depends on.
  • After the drone.io setup, Webhook will be configured automatically.
    So every time you git push, drone.io runs build.
    Capture of Webhook page
  • Unfortunately, peco.exe for Windows doesn't work on my environment.

References

I referred these pages.

Output user query (wizard mode)

Let say a developer wants to filter something with peco for a script (e.g. a cron), first he wants to try the command itself (and discover the output data with peco), so he runs:

myVar="some script variable"
git grep $myVar | peco --wizard

Peco opens, the dev use the selector to match what he wants (and he can directly see the output in peco, that's what Bret Victor would call instant feedback), then, when he exits, peco prints:

peco --query="myQuery -excludeA -excludeB"

So the developer will just have to put copy/paste the command below inside his script :

myVar="some script variable"
git grep $myVar | peco --query="myQuery -excludeA -excludeB"

PS: I just installed peco so I did not took the time to see how fare the query engine could go. Here "-excludeA" and "-excludeB" are word exclusions.

allow Shift+Tab as a keybinding

I'd like to be able to use Tab to move forward in the list of options and Shift+Tab to move backward, but it seems like "S-Tab" isn't a valid key in the config file. (Also, there's no indication that a key that you're trying to bind to isn't valid.)

Option for placing query line at bottom of view rather than top

I use peco as a replacement for my shell's ctrl+r history search. And most of the time in any shell, the prompt will be at the bottom of the window as there's preview commands and output above.

Hence an option to have the query appear at the bottom instead of the top, would make it nicer to use as shell history replacement, cause your eyes wouldn't need to travel from the bottom to the top of the window.

Obviously this would also mean the result list would need to be reversed.

And that's my feature request :)

Add screenshots

  • Multi-line selection
  • Replace multi-query selection
  • Regexp matcher

Don't refresh list after peco.DeleteAll

I type some query and call peco.DeleteAll (map to C-w). but candidate list doesn't refresh.

peco

I don't know how to build my own peco with Go. sorry not PR.

Thank you for nice tool. I decided to migrate from percol 😄

Separate by user specification

example

  • --record-sep=' '
  • --sep=' '
echo 'foo bar' | peco --sep ' ' # or ascii?
  • display
foo bar
  • selected
foo

usecase

  • grep hostname
`view host list command` | peco --spec ' '
  • display
ip_addr1 hostname2
ip_addr2 hostname2
  1. grep hostname
  2. select ip_addr

go's cross compilation fails when we use os/user

This issue is basically a reminder for us so we can remember this later.

See #101 . Basically:

  • Go currently does not support cross compilation for cgo
  • os/user for darwin and linux uses cgo for getpwuid_r
  • Using wercker to do cross-compilation basically just... fails.
  • But instead of failure, we get a half-baked binary.

Currently I don't see any way to overcome this. Maybe rewrite glibc in go (HA HA!).

Maybe some note in docs about [CTRL]+[Space]

Hi!

First off, a big THANKS, peco is cool! I'm using it on Lubuntu 14.04 and its working perfectly.
I had issues with selecting multiple lines. The reason was, that on Ubuntu IBUS uses the key combo [CTRL]-[Space] by default before Bash can get it. So I had to disable it.
Maybe that small trick is worth a note in the docs.

Some more details about ways to disable it here: http://askubuntu.com/questions/243639/ctrlspace-has-been-bound-to-invoke-some-input-method-and-does-not-work-in-ema

RFC: Pizza! Having data contexts

Currently, peco is reading text lines and output filtered lines that was contained in stdin. This is very useful to manipulate contents as you can see. However, if I want to create an application that using peco, I don't hope it match to extra content in the lines. For example:

$ cat foo.txt
title1 url1
title2 url2

$ cat foo.txt | peco
url2

I want the way to display only titles. And want to get URLs for output. So:

How about this?

When given -zero for arguments, peco separate tokens by \x00 in the line.
First tokens are displayed but not to be written to stdout. This will be useful to create RSS feed application. Or you can create application that take order to buy pizza.

Thanks.

Range mode not available by default

Couldn't figure out how to select multiple lines as demoed in the README. There seems to be a range mode but no default key binding for it?

Refactor keymap.go

I've started to put key<->string conversions into termbox-go (see nsf/termbox-go#39). Once this is accepted in upstream, we can remove much of the specific code in keymap.go and add configuration writing to config.go

"panic: runtime error: close of closed channel" occurs when inputting long query

CentOS 上でこのバイナリを使っていて起こりました。
https://github.com/peco/peco/releases/download/v0.1.9/peco_linux_amd64.tar.gz

再現条件がよくわかってないですが、 panic: runtime error: close of closed channel となって異常終了することがあるようです。

長いクエリを入力していると発生するように見えます。
a のあとに半角スペースを入力し続けたりしていると発生しますが、すぐ出るときとなかなか出ないときとあります。

以下はそのときのエラー出力です。
ただ、これが発生するとターミナルの出力が壊れてしまうので、適当に整形して貼り付けています。
http://gyazo.com/a92f93cb90b1e1ce8c44858a687c2788

panic: runtime error: close of closed channel

goroutine 503 [running]:
runtime.panic(0x59d660, 0x6c72b5)
/usr/local/go/src/pkg/runtime/panic.c:279 +0xf5
github.com/peco/peco.(*RegexpMatcher).Match(0xc2080226c0, 0xc2080785a0, 0xc208192f60, 0xe, 0xc20817a000, 0x3e1, 0x3e1, 0x0, 0x0, 0x0)
/home/ubuntu/go/src/github.com/peco/peco/matchers.go:259 +0x26e
github.com/peco/peco.(*Filter).Work(0xc208000730, 0xc2080785a0, 0xc208192f60, 0xe)
/home/ubuntu/go/src/github.com/peco/peco/filter.go:13 +0x270
created by github.com/peco/peco.(*Filter).Loop
/home/ubuntu/go/src/github.com/peco/peco/filter.go:39 +0x215

goroutine 16 [semacquire]:
sync.runtime_Semacquire(0xc20800076c)
/tmp/makerelease197226928/go/src/pkg/runtime/sema.goc:199 +0x30
sync.(*WaitGroup).Wait(0xc20803e240)
/usr/local/go/src/pkg/sync/waitgroup.go:129 +0x14b
github.com/peco/peco.(*Ctx).WaitDone(0xc208050300)
/home/ubuntu/go/src/github.com/peco/peco/ctx.go:134 +0x2e
main.main()
/home/ubuntu/go/src/github.com/peco/peco/cmd/peco/peco.go:170 +0xea1

goroutine 19 [finalizer wait]:
runtime.park(0x414820, 0x6cb400, 0x6c9f49)
/usr/local/go/src/pkg/runtime/proc.c:1369 +0x89
runtime.parkunlock(0x6cb400, 0x6c9f49)
/usr/local/go/src/pkg/runtime/proc.c:1385 +0x3b
runfinq()
/usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xcf
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1445

goroutine 20 [syscall]:
os/signal.loop()
/usr/local/go/src/pkg/os/signal/signal_unix.go:21 +0x1e
created by os/signal.init·1
/usr/local/go/src/pkg/os/signal/signal_unix.go:27 +0x32

goroutine 17 [syscall]:
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1445

goroutine 21 [select]:
github.com/nsf/termbox-go.func·001()
/home/ubuntu/go/src/github.com/nsf/termbox-go/api.go:86 +0x41a
created by github.com/nsf/termbox-go.Init
/home/ubuntu/go/src/github.com/nsf/termbox-go/api.go:105 +0x82e

goroutine 22 [runnable]:
github.com/peco/peco.(*View).Loop(0xc208039f48)
/home/ubuntu/go/src/github.com/peco/peco/view.go:34 +0x1aa
created by main.main
/home/ubuntu/go/src/github.com/peco/peco/cmd/peco/peco.go:158 +0xd34

goroutine 23 [select]:
github.com/peco/peco.(*Filter).Loop(0xc208000730)
/home/ubuntu/go/src/github.com/peco/peco/filter.go:27 +0x239
created by main.main
/home/ubuntu/go/src/github.com/peco/peco/cmd/peco/peco.go:159 +0xd4f

goroutine 24 [select]:
github.com/peco/peco.(*Input).Loop(0xc208000740)
/home/ubuntu/go/src/github.com/peco/peco/input.go:37 +0x431
created by main.main
/home/ubuntu/go/src/github.com/peco/peco/cmd/peco/peco.go:160 +0xd6a

goroutine 25 [select]:
github.com/peco/peco.(*Ctx).SignalHandlerLoop(0xc208050300, 0xc208029110)
/home/ubuntu/go/src/github.com/peco/peco/ctx.go:238 +0xe3
created by main.main
/home/ubuntu/go/src/github.com/peco/peco/cmd/peco/peco.go:161 +0xd92

goroutine 26 [select]:
github.com/nsf/termbox-go.PollEvent(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/ubuntu/go/src/github.com/nsf/termbox-go/api.go:244 +0x396
github.com/peco/peco.func·001()
/home/ubuntu/go/src/github.com/peco/peco/input.go:30 +0x27
created by github.com/peco/peco.(*Input).Loop
/home/ubuntu/go/src/github.com/peco/peco/input.go:32 +0xce

goroutine 504 [runnable]:
github.com/peco/peco.(*RegexpMatcher).MatchAllRegexps(0xc2080226c0, 0xc2080ecd80, 0xc, 0x10, 0xc2080236b0, 0x30, 0x0, 0x0, 0x0)
/home/ubuntu/go/src/github.com/peco/peco/matchers.go:296 +0x455
github.com/peco/peco.func·004()
/home/ubuntu/go/src/github.com/peco/peco/matchers.go:243 +0x152
created by github.com/peco/peco.(*RegexpMatcher).Match
/home/ubuntu/go/src/github.com/peco/peco/matchers.go:250 +0x203

goroutine 498 [runnable]:
regexp.(*Regexp).FindAllStringSubmatchIndex(0xc2082cd7c0, 0xc2080435c0, 0x38, 0xffffffffffffffff, 0xc208024800, 0x39, 0x55)
/usr/local/go/src/pkg/regexp/regexp.go:1059
github.com/peco/peco.(*RegexpMatcher).MatchAllRegexps(0xc2080226c0, 0xc2080eca00, 0xc, 0x10, 0xc2080435c0, 0x38, 0x0, 0x0, 0x0)
/home/ubuntu/go/src/github.com/peco/peco/matchers.go:279 +0x120
github.com/peco/peco.func·004()
/home/ubuntu/go/src/github.com/peco/peco/matchers.go:243 +0x152
created by github.com/peco/peco.
/home/ubuntu/go/src/github.com/peco/peco/matchers.go:250 +0x203

goroutine 493 [runnable]:
regexp.(*Regexp).FindAllStringSubmatchIndex(0xc2082cdd60, 0xc208096180, 0x2e, 0xffffffffffffffff, 0xc208025000, 0x2f, 0x55)
/usr/local/go/src/pkg/regexp/regexp.go:1059
github.com/peco/peco.(*RegexpMatcher).MatchAllRegexps(0xc2080226c0, 0xc2080ec180, 0xc, 0x10, 0xc208096180, 0x2e, 0x0, 0x0, 0x0)
/home/ubuntu/go/src/github.com/peco/peco/matchers.go:279 +0x120
github.com/peco/peco.func·004()
/home/ubuntu/go/src/github.com/peco/peco/matchers.go:243 +0x152
created by github.com/peco/peco.(*RegexpMatcher).Match
/home/ubuntu/go/src/github.com/peco/peco/matchers.go:250 +0x203

goroutine 494 [runnable]:
regexp.(*Regexp).FindAllStringSubmatchIndex(0xc20803b7c0, 0xc2080432c0, 0x3b, 0xffffffffffffffff, 0xc208100800, 0x3c, 0x55)
/usr/local/go/src/pkg/regexp/regexp.go:1059
github.com/peco/peco.(*RegexpMatcher).MatchAllRegexps(0xc2080226c0, 0xc2080ecb00, 0xc, 0x10, 0xc2080432c0, 0x3b, 0x0, 0x0, 0x0)
/home/ubuntu/go/src/github.com/peco/peco/matchers.go:279 +0x120
github.com/peco/peco.func·004()
/home/ubuntu/go/src/github.com/peco/peco/matchers.go:243 +0x152
created by github.com/peco/peco.(*RegexpMatcher).Match
/home/ubuntu/go/src/github.com/peco/peco/matchers.go:250 +0x203

goroutine 495 [runnable]:
github.com/peco/peco.(*Filter).Work(0xc208000730, 0xc208078300, 0xc2082644a0, 0xd)
/home/ubuntu/go/src/github.com/peco/peco/filter.go:8
created by github.com/peco/peco.(*Filter).Loop
/home/ubuntu/go/src/github.com/peco/peco/filter.go:39 +0x215

Regexp handler

Sometimes, I hope to match like below.

QUERY> foo.*\.go$

Refactor code

  • Keep the current scheme where loop-y constructs are in their own goroutines
  • rename, move stuff around
  • make sure ctx's data is protected. may need to completely change how stuff like "query" is accessed

Crash when selecting multiple items.

I was selecting multiple items in the output of something silly like

ls | peco | grep i

just for testing peco.

yes.xdspanic: bytes.Buffer: truncation out of range

                                                   goroutine 25 [running]:
                                                                          runtime.panic(0x154440, 0x20841a3e0)
                                                                                                                /usr/local/go/src/pkg/runtime/panic.c:279 +0xf5
                                       bytes.(*Buffer).Truncate(0x2f77c0, 0x0)
                                                                                /usr/local/go/src/pkg/bytes/buffer.go:65 +0xc1
      bytes.(*Buffer).WriteTo(0x2f77c0, 0x2208364940, 0x2083880d8, 0x118b, 0x0, 0x0)
                                                                                        /usr/local/go/src/pkg/bytes/buffer.go:218 +0x1b2
                io.Copy(0x2208364940, 0x2083880d8, 0x2208364968, 0x2f77c0, 0x0, 0x0, 0x0)
                                                                                            /usr/local/go/src/pkg/io/io.go:345 +0xb4
                github.com/nsf/termbox-go.flush(0x0, 0x0)
                                                            /tmp/godep/rev/81/b415f8400796494f30d99fc9df17e03acacc71/src/github.com/nsf/termbox-go/termbox.go:160 +0xa4
                                                   github.com/nsf/termbox-go.Flush(0x0, 0x0)
                                                                                                /tmp/godep/rev/81/b415f8400796494f30d99fc9df17e03acacc71/src/github.com/nsf/termbox-go/api.go:189 +0x210
                                                                                github.com/peco/peco.(*View).drawScreen(0x20834ecf0, 0x2083f2000, 0x14, 0x20)
                                        /home/ubuntu/go/src/github.com/peco/peco/view.go:285 +0x7b1
                                                                                                   github.com/peco/peco.(*View).movePage(0x20834ecf0, 0x0)
                                    /home/ubuntu/go/src/github.com/peco/peco/view.go:145 +0xa3
                                                                                                  github.com/peco/peco.(*View).Loop(0x20834ecf0)
                            /home/ubuntu/go/src/github.com/peco/peco/view.go:46 +0x46c
                                                                                          created by main.main
                                                                                                                /home/ubuntu/go/src/github.com/peco/peco/cmd/peco/peco.go:197 +0xe9e

                                                            goroutine 16 [semacquire]:
                                                                                      sync.runtime_Semacquire(0x20834f2ac)
    /usr/local/go/src/pkg/runtime/sema.goc:199 +0x30
                                                        sync.(*WaitGroup).Wait(0x20838c3e0)
                                                                                            /usr/local/go/src/pkg/sync/waitgroup.go:129 +0x14b
                          github.com/peco/peco.(*Ctx).WaitDone(0x2083ca480)
                                                                            /home/ubuntu/go/src/github.com/peco/peco/ctx.go:135 +0x2e
                 main.main()
                                /home/ubuntu/go/src/github.com/peco/peco/cmd/peco/peco.go:211 +0x109e

                                                                                                     goroutine 19 [finalizer wait]:
           runtime.park(0x16280, 0x2f6c18, 0x2f5fa9)
                                                        /usr/local/go/src/pkg/runtime/proc.c:1369 +0x89
                                                                                                       runtime.parkunlock(0x2f6c18, 0x2f5fa9)
                        /usr/local/go/src/pkg/runtime/proc.c:1385 +0x3b
                                                                       runfinq()
                                                                                    /usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xcf
               runtime.goexit()
                                /usr/local/go/src/pkg/runtime/proc.c:1445

                                                                         goroutine 20 [syscall]:
                                                                                                os/signal.loop()
                                                                                                                    /usr/local/go/src/pkg/os/signal/signal_unix.go:21 +0x1e
                                                       created by os/signal.init·1
                                                                                    /usr/local/go/src/pkg/os/signal/signal_unix.go:27 +0x32

                       goroutine 24 [select]:
                                             github.com/nsf/termbox-go.func·001()
                                                                                    /tmp/godep/rev/81/b415f8400796494f30d99fc9df17e03acacc71/src/github.com/nsf/termbox-go/api.go:86 +0x41a
                                                                       created by github.com/nsf/termbox-go.Init
                                                                                                                    /tmp/godep/rev/81/b415f8400796494f30d99fc9df17e03acacc71/src/github.com/nsf/termbox-go/api.go:105 +0x81b

                                                                                                        goroutine 26 [select]:
      github.com/peco/peco.(*Filter).Loop(0x20834ed00)
                                                        /home/ubuntu/go/src/github.com/peco/peco/filter.go:36 +0x1dc
                                                                                                                    created by main.main
                    /home/ubuntu/go/src/github.com/peco/peco/cmd/peco/peco.go:197 +0xe9e

                                                                                            goroutine 27 [select]:
                                                                                                                  github.com/peco/peco.(*Input).Loop(0x2083c81e0)
                                            /home/ubuntu/go/src/github.com/peco/peco/input.go:41 +0x1a3
                                                                                                           created by main.main
        /home/ubuntu/go/src/github.com/peco/peco/cmd/peco/peco.go:197 +0xe9e

                                                                            goroutine 28 [select]:
                                                                                                  github.com/peco/peco.(*SignalHandler).Loop(0x20834f2b0)
                                    /home/ubuntu/go/src/github.com/peco/peco/ctx.go:239 +0xfc
                                                                                                 created by main.main
                                                                                                                        /home/ubuntu/go/src/github.com/peco/peco/cmd/peco/peco.go:197 +0xe9e

                                                                    goroutine 29 [select]:
                                                                                          github.com/nsf/termbox-go.PollEvent(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
                                            /tmp/godep/rev/81/b415f8400796494f30d99fc9df17e03acacc71/src/github.com/nsf/termbox-go/api.go:244 +0x396
                                github.com/peco/peco.func·008()
                                                                /home/ubuntu/go/src/github.com/peco/peco/input.go:36 +0x27
  created by github.com/peco/peco.(*Input).Loop
                                                /home/ubuntu/go/src/github.com/peco/peco/input.go:38 +0xae

peco.Cancel action

I suppose peco.Cancel should work like sending SIGINT.
(peco.Cancel should kills processes in same session group.)
Now successive command is executed if peco.Cancel is executed.
For example,

% ls -l | peco | xargs echo "hoge"
hoge

On the other hand, cancel command of percol(C-c) works like sending SIGINT.

% ls -l |percol| xargs echo "hoge"
# Nothing is shown

Key sequence crashes

Thank you for working on key sequence and KONAMI command!

issue

I use OSX 10.9.3
On trie_key_sequence branch, when I press C-x, peco crashes with my config:

{
  "Keymap": {
    "C-x,C-c": "peco.Cancel"
  },
  "Style": {
    "Basic": ["on_default", "default"],
    "SavedSelection": ["on_blue", "black"],
    "Selected": ["on_cyan", "black"],
    "Query": ["on_default", "default"],
    "Matched": ["yellow", "bold"]
  }
}

option to allow editing of choice / empty choice

I want to use this as a "Pick a host to SSH to" using known_hosts and Host lines from config, but I also want to handle the case where I've never connected to the host before. It would be helpful to have a flag that would prompt to edit the choice, after selection.

Move development branch to devel instead of master

@peco/owners : Once I make the konami command, er, key sequence thing work and release 0.2.0, I would like to change the main development branch to "devel", and only merge to master for stable changes.

refactor keymap.go

It's a mess. I really should rethink the code in order to make PRs easier.

FreeBSD support?

How's the FreeBSD support? I was trying to build peco today and I think it failed with the following errors. Any plans for supporting FreeBSD?

go version go1.3 freebsd/amd64

donnex@..:~ $ go get github.com/peco/peco/cmd/peco
# github.com/peco/peco
go/src/github.com/peco/peco/tty_posix.go:11: IsTty redeclared in this block
    previous declaration at go/src/github.com/peco/peco/tty_bsd.go:11
go/src/github.com/peco/peco/tty_posix.go:13: undefined: syscall.TCGETS
go/src/github.com/peco/peco/tty_posix.go:18: TtyReady redeclared in this block
    previous declaration at go/src/github.com/peco/peco/tty_bsd.go:18
go/src/github.com/peco/peco/tty_posix.go:23: TtyTerm redeclared in this block
    previous declaration at go/src/github.com/peco/peco/tty_bsd.go:23

Automate build process

To build (including development)

go run releng/build.go 

To release (git tag, git push, etc)

go run releng/release.go --version vX.Y.Z

strange key input handling since 0.1.12

try the following command with peco-0.1.12 or later.

$ seq 10 | peco | peco

I expect peco runs twice, but not.
it looks key input to be passed from second "peco" to first "peco".

on peco-0.1.11:

$ python | peco
Python 2.7.7 (default, Jun  2 2014, 01:41:14) 
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
You must supply something to work with via filename or stdin
$

on peco-0.1.12:

$ python | peco
QUERY>                                                          IgnoreCase [1/1]
Python 2.7.7 (default, Jun  2 2014, 01:41:14) 
                          [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]
on darwin
          Type "help", "copyright", "credits" or "license" for more information.
                                                            >>> 

I cannot quit peco without kill command.

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.