diff --git a/README.md b/README.md index 3010dea..4b8138d 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,7 @@ smart people at [Hashrocket](http://hashrocket.com/). - [Global Substitution On The Previous Command](zsh/global-substitution-on-the-previous-command.md) - [Killing A Frozen SSH Session](zsh/killing-a-frozen-ssh-session.md) - [List All The Say Voices](zsh/list-all-the-say-voices.md) +- [Only Show The Matches](zsh/only-show-the-matches.md) - [Repeat Yourself](zsh/repeat-yourself.md) - [Saying Yes](zsh/saying-yes.md) - [Search History](zsh/search-history.md) diff --git a/zsh/only-show-the-matches.md b/zsh/only-show-the-matches.md new file mode 100644 index 0000000..b12a130 --- /dev/null +++ b/zsh/only-show-the-matches.md @@ -0,0 +1,10 @@ +# Only Show The Matches + +Tools like `grep`, `ack`, and `ag` make it easy to search for lines in a +file that contain certain text and patterns. They all come with the `-o` +flag which tells them to only show the part that matches. + +This is particularly powerful when used with regex and piped into other +programs. + +h/t Dillon Hafer