1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-06 00:28:01 +00:00

Add Only Show The Matches as a zsh til.

This commit is contained in:
jbranchaud
2015-08-17 22:10:04 -05:00
parent ee2b6313e9
commit e14360d502
2 changed files with 11 additions and 0 deletions

View File

@@ -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)

View File

@@ -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