← 返回命令列表

Linux command

peco 命令

文件

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Interactive filter

ls | peco

Filter with query

history | peco --query "[pattern]"

Select file and open with a command

find . -type f | peco | xargs [command]

With custom prompt

peco --prompt="Select> "

说明

peco is an interactive filtering tool. Select from stdin with fuzzy matching. The tool provides incremental search. Similar to fzf and percol.

参数

--query _STRING_
Initial query string.
--prompt _STRING_
Custom prompt string.
--layout _TYPE_
Display layout: top-down or bottom-up. Default is top-down.
--initial-index _N_
Start selection at line N.
--rcfile _PATH_
Path to the settings file.
-b, --buffer-size _N_
Number of lines to keep in search buffer. Useful when piping from an infinite stream.
--null
Expect NUL (\0) as separator for target/output.
--select-1
Immediately select and exit if input contains only one item.
--on-cancel _ACTION_
Action on user cancel: success or error. Default is success.
--initial-filter _FILTER_
Specify the default filter (e.g., Regexp, SmartCase).

FAQ

What is the peco command used for?

peco is an interactive filtering tool. Select from stdin with fuzzy matching. The tool provides incremental search. Similar to fzf and percol.

How do I run a basic peco example?

Run `ls | peco` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --query _STRING_ do in peco?

Initial query string.