4 ![demo](https://raw.github.com/edi9999/i/master/demo.gif?v=2)
6 PathExtractor is a command line tool that extracts a list of files/paths from stdin.
8 Advantages over [fpp](https://github.com/facebook/PathPicker):
10 - It does only one thing : more unixy
11 - 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/)
12 - It doesn't wait for stdin to be finished to output the paths
14 - It is much smaller (easily understandable)
15 - You can also use it without a fuzzy finder for programmatic usage
17 For example, you could write:
23 to get a list of the files that were added/changed, without all the formating
25 One of the most common usage is to create an alias that will automatically run :
27 `pe` + a command line fuzzy finder such as fzf + an action such as opening that file in your favorite editor.
29 For example, using `zsh` , I have as an alias:
32 alias -g P='| pe | fzf | read filename; [ ! -z $filename ] && vim $filename'
38 bind '"PP": "| pe | uniq | fzf | while read filename; do [ ! -z $filename ] && </dev/tty vim $filename; done\n'
53 to quickly open one of the changed files in vim
60 # Copy selected path to clipboard
61 alias -g C='| pe | fzf | read filename; [ ! -z $filename ] && echo -n $filename | xclip -selection c'
67 bind '"CC": "| pe | fzf | read filename; [ ! -z $filename ] && echo -n $filename | xclip -selection c\n"'
74 go get github.com/edi9999/path-extractor/path-extractor
77 You will have the `path-extractor` in your `$GOPATH/bin` directory which you can rename or alias to `pe`
82 They are no binaries for now (you have to build it yourself), but one idea would be to use [goxc](https://github.com/laher/goxc) to compile it on multiple platforms