百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

path-extractor

> 编程语言
开源

一个 unix 过滤器,它输出在 stdin 中找到的文件路径

181 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

一个 unix 过滤器,它输出在 stdin 中找到的文件路径

PathExtractor (pe)

PathExtractor is a command line tool that extracts a list of files/paths from stdin.

Advantages over fpp:

  • It does only one thing : more unixy
  • You can use it with any fuzzy finder, such as fzf,peco,percol,pick,selecta
  • It doesn't wait for stdin to be finished to output the paths
  • It is faster
  • It is much smaller (easily understandable)
  • You can also use it without a fuzzy finder for programmatic usage

For example, you could write:

bash
git status | pe

to get a list of the files that were added/changed, without all the formating

One of the most common usage is to create an alias that will automatically run :

pe + a command line fuzzy finder such as fzf + an action such as opening that file in your favorite editor.

For example, using zsh , I have as an alias:

bash
alias -g P='| pe | fzf | read filename; [ ! -z $filename ] && vim $filename'

With bash:

bash
bind '"PP": "| pe | uniq | fzf | while read filename; do [ ! -z $filename ] && </dev/tty vim $filename; done\n'

So that If I run

bash
git status P

or

bash
git status PP

to quickly open one of the changed files in vim

Other usage ideas:

With zsh:

bash
# Copy selected path to clipboard
alias -g C='| pe | fzf | read filename; [ ! -z $filename ] && echo -n $filename | xclip -selection c'

With bash:

bash
bind '"CC": "| pe | fzf | read filename; [ ! -z $filename ] && echo -n $filename | xclip -selection c\n"'

Installation

bash
go install github.com/edi9999/path-extractor@latest
# sudo mv "$(which path-extractor)" /usr/bin/pe

You will have the path-extractor in your $GOPATH/bin directory which you can rename or alias to pe

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Go

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言