2

I don't know whether this is the right place to post this question, but if you are not an Emacs user, I'll explain the basic usage of helm-occur/helm-swoop.

I like helm-occur/helm-swoop for Emacs very much, but when I'm not using Emacs, is there any tool in terminal for me that acts like helm-occur/helm-swoop, it does not need to provide all features that they provide, all I need is to search pattern in directories/files, and it will list all the matches and I can choose one of them and jump to it for viewing or editing, after viewing or editing, I can go back to the list and choose another, there is a package called percol that will list the matches, but It cannot jump to the file.

BTW, I use ag or grep.

2
  • Why not use emacsclient -nw? May 7, 2015 at 20:00
  • @Gilles I mean a tool in terminal completely outside of Emacs
    – CodyChan
    May 8, 2015 at 1:13

1 Answer 1

0

Try PathPicker.

PathPicker is a simple command line tool that solves the perpetual problem of selecting files out of bash output.

Installation

From examples:

git status | fpp
grep -r "FooBar" . | fpp
find . -iname "*.js" | fpp

Use the -ko option if you want go back to the list:

-ko, --keep-open keep PathPicker open once a file selection or command is performed. This will loop the program until Ctrl-C is used to terminate the process.

Note about editor:

The $FPP_EDITOR environment variable can be set to tell PathPicker which editor to open the selected files with. If that variable is not set, $VISUAL and then $EDITOR are used as fallbacks, with "vim" as a last resort.

Update:
There is an undocumented feature in fpp: fpp recognizes the line numbers in grep output. So, you can add a line number grep -rn foo . | fpp -ko and jump to the matched lines.

1
  • "PathPicker is a combination of a bash script and some small Python modules.". It seems it doesn't support fishshell.
    – CodyChan
    Mar 8, 2016 at 7:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .