Skip to content

Instantly share code, notes, and snippets.

@LucasMW
Last active October 9, 2018 13:23
Show Gist options
  • Save LucasMW/f85794da0ead73af5c070c2fc14136a7 to your computer and use it in GitHub Desktop.
Save LucasMW/f85794da0ead73af5c070c2fc14136a7 to your computer and use it in GitHub Desktop.
Open files containing the word "x" and file name contains "y"

Requires ag (The Silver Searcher)

brew install ag

General formula:

ide $(ag x -G y -l)

Example:

Open with android studio all files from current direct containing the word "order" and file name contains Activity.java

studio $(ag order -G Activity.java -l)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment