aboutsummaryrefslogtreecommitdiffstats
path: root/README.org
diff options
context:
space:
mode:
authorAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-09-28 23:23:08 +0300
committerAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-09-28 23:23:08 +0300
commit6d162956409c0fa394920ba707109afdbff041e5 (patch)
treee8ba35a7bc0c4ddc2e18b0ad637f440f0ce4f16a /README.org
parent0537597c4924e48b18ca79005be2103079b8d009 (diff)
downloadck-6d162956409c0fa394920ba707109afdbff041e5.tar.gz
ck-6d162956409c0fa394920ba707109afdbff041e5.tar.bz2
ck-6d162956409c0fa394920ba707109afdbff041e5.zip
fix minor grep nuiscance
Diffstat (limited to 'README.org')
-rw-r--r--README.org21
1 files changed, 16 insertions, 5 deletions
diff --git a/README.org b/README.org
index aa2ebae..004ea2e 100644
--- a/README.org
+++ b/README.org
@@ -230,21 +230,32 @@ Perform infile grep in all the configurations ck keeps track of.
Takes one argument, the *search-term*.
-To search for terms with spaces you have to put them in escaped quotes.
-To search for special symbols you have to enclose them in quotes and escape them.
+To search for terms with spaces you have to put them in quotes.
Usage:
#+BEGIN_SRC sh
# search for parenthesis
- $ ck search "\("
+ $ ck search \(
# search term with spaces
- $ ck search "\"This is a space\""
+ $ ck search "This is a space"
# both
- $ ck search "\"(add 2 4)\""
+ $ ck search "(add 2 4)"
# and a normal one
$ ck search alias
#+END_SRC
+If you want to use more advanced grep techniques or even
+a different pattern matching program you can do it like so:
+
+#+BEGIN_SRC sh
+ # with xargs
+ $ ck ls paths | xargs grep -E 'A|B'
+ # or in bash
+ $ for i in $(ck ls paths); do grep -E 'A|B' $i; done
+ # or in zsh
+ $ for i ($(ck ls paths)) grep -E 'A|B' $i
+#+END_SRC
+
*** edit
or e or -e