{"id":13581304,"url":"https://github.com/edi9999/path-extractor","last_synced_at":"2025-09-15T00:31:09.252Z","repository":{"id":58945910,"uuid":"37810063","full_name":"edi9999/path-extractor","owner":"edi9999","description":"A unix filter which outputs the filepaths found in stdin","archived":false,"fork":false,"pushed_at":"2022-09-09T16:11:13.000Z","size":29,"stargazers_count":170,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-22T18:32:34.832Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edi9999.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-21T13:34:26.000Z","updated_at":"2024-05-16T19:47:51.000Z","dependencies_parsed_at":"2022-09-13T12:52:14.351Z","dependency_job_id":null,"html_url":"https://github.com/edi9999/path-extractor","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edi9999%2Fpath-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edi9999%2Fpath-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edi9999%2Fpath-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edi9999%2Fpath-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edi9999","download_url":"https://codeload.github.com/edi9999/path-extractor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233050590,"owners_count":18617314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:02:00.131Z","updated_at":"2025-01-08T15:15:32.199Z","avatar_url":"https://github.com/edi9999.png","language":"Go","readme":"# PathExtractor (pe)\n\n![demo](https://raw.github.com/edi9999/i/master/demo.gif?v=2)\n\nPathExtractor is a command line tool that extracts a list of files/paths from stdin.\n\nAdvantages over [fpp](https://github.com/facebook/PathPicker):\n\n- It does only one thing : more unixy\n- You can use it with any fuzzy finder, such as [fzf](https://github.com/junegunn/fzf),[peco](https://github.com/peco/peco),[percol](https://github.com/mooz/percol),[pick](https://github.com/thoughtbot/pick),[selecta](https://github.com/garybernhardt/selecta/)\n- It doesn't wait for stdin to be finished to output the paths\n- It is faster\n- It is much smaller (easily understandable)\n- You can also use it without a fuzzy finder for programmatic usage\n\nFor example, you could write:\n\n```sh\ngit status | pe\n```\n\nto get a list of the files that were added/changed, without all the formating\n\nOne of the most common usage is to create an alias that will automatically run :\n\n`pe` + a command line fuzzy finder such as fzf + an action such as opening that file in your favorite editor.\n\nFor example, using `zsh` , I have as an alias:\n\n```sh\nalias -g P='| pe | fzf | read filename; [ ! -z $filename ] \u0026\u0026 vim $filename'\n```\n\nWith `bash`:\n\n```sh\nbind '\"PP\": \"| pe | uniq | fzf | while read filename; do [ ! -z $filename ] \u0026\u0026 \u003c/dev/tty vim $filename; done\\n'\n```\n\nSo that If I run\n\n```sh\ngit status P\n```\n\nor\n\n```sh\ngit status PP\n```\n\nto quickly open one of the changed files in vim\n\nOther usage ideas:\n\nWith zsh:\n\n```sh\n# Copy selected path to clipboard\nalias -g C='| pe | fzf | read filename; [ ! -z $filename ] \u0026\u0026 echo -n $filename | xclip -selection c'\n```\n\nWith bash:\n\n```sh\nbind '\"CC\": \"| pe | fzf | read filename; [ ! -z $filename ] \u0026\u0026 echo -n $filename | xclip -selection c\\n\"'\n```\n\n# Installation\n\n```sh\ngo install github.com/edi9999/path-extractor@latest\n# sudo mv \"$(which path-extractor)\" /usr/bin/pe\n```\n\nYou will have the `path-extractor` in your `$GOPATH/bin` directory which you can rename or alias to `pe`\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedi9999%2Fpath-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedi9999%2Fpath-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedi9999%2Fpath-extractor/lists"}