aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.html156
-rw-r--r--README.org8
-rw-r--r--src/actionparser.c2
3 files changed, 83 insertions, 83 deletions
diff --git a/README.html b/README.html
index 45839fd..4ebb066 100644
--- a/README.html
+++ b/README.html
@@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
-<!-- 2018-10-09 Tue 20:53 -->
+<!-- 2018-10-09 Tue 20:56 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>&lrm;</title>
@@ -232,35 +232,35 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
-<li><a href="#org06be2ec">ck</a></li>
-<li><a href="#orgdd738de">build it</a>
+<li><a href="#orgc9240f3">ck</a></li>
+<li><a href="#org60bac51">build it</a>
<ul>
-<li><a href="#org00d5007">requirements</a></li>
-<li><a href="#org0c0a491">compiler</a></li>
-<li><a href="#org7ba7a71">make</a></li>
+<li><a href="#org4cf78c5">requirements</a></li>
+<li><a href="#org6cf0688">compiler</a></li>
+<li><a href="#org0b93260">make</a></li>
</ul>
</li>
-<li><a href="#org5cb365e">for devs</a>
+<li><a href="#orgefaaf9e">for devs</a>
<ul>
-<li><a href="#org148ba3a">CMake options</a></li>
-<li><a href="#org20e80d6">tests</a>
+<li><a href="#orgd6a17aa">CMake options</a></li>
+<li><a href="#org24ae1c0">tests</a>
<ul>
-<li><a href="#org75775b9">run tests</a></li>
-<li><a href="#orgf7207a9">test suite</a></li>
+<li><a href="#org3643483">run tests</a></li>
+<li><a href="#org4d8845f">test suite</a></li>
</ul>
</li>
</ul>
</li>
-<li><a href="#org3401884">manual</a>
+<li><a href="#orga1fc528">manual</a>
<ul>
-<li><a href="#org41c11d4">ck configuration</a></li>
-<li><a href="#org72890ad">Actions</a>
+<li><a href="#org120ab66">ck configuration</a></li>
+<li><a href="#orgf813874">Actions</a>
<ul>
-<li><a href="#org3b0ec54">init</a></li>
-<li><a href="#orgc9498d4">add</a></li>
-<li><a href="#orge78ef4d">list</a></li>
-<li><a href="#org914dcb8">search</a></li>
-<li><a href="#orga1030cc">edit</a></li>
+<li><a href="#org999a834">init</a></li>
+<li><a href="#org202a2f7">add</a></li>
+<li><a href="#orgb7f4676">list</a></li>
+<li><a href="#org01e2cdb">search</a></li>
+<li><a href="#org1d8ff57">edit</a></li>
</ul>
</li>
</ul>
@@ -269,22 +269,22 @@ for the JavaScript code in this tag.
</div>
</div>
<p align="center"><img src="res/logo.png" width="30%" height="30%" /></p>
-<div id="outline-container-org06be2ec" class="outline-2">
-<h2 id="org06be2ec">ck</h2>
-<div class="outline-text-2" id="text-org06be2ec">
+<div id="outline-container-orgc9240f3" class="outline-2">
+<h2 id="orgc9240f3">ck</h2>
+<div class="outline-text-2" id="text-orgc9240f3">
<p>
<b>The Config Keeper</b>
</p>
</div>
</div>
-<div id="outline-container-orgdd738de" class="outline-2">
-<h2 id="orgdd738de">build it</h2>
-<div class="outline-text-2" id="text-orgdd738de">
+<div id="outline-container-org60bac51" class="outline-2">
+<h2 id="org60bac51">build it</h2>
+<div class="outline-text-2" id="text-org60bac51">
</div>
-<div id="outline-container-org00d5007" class="outline-3">
-<h3 id="org00d5007">requirements</h3>
-<div class="outline-text-3" id="text-org00d5007">
+<div id="outline-container-org4cf78c5" class="outline-3">
+<h3 id="org4cf78c5">requirements</h3>
+<div class="outline-text-3" id="text-org4cf78c5">
<ul class="org-ul">
<li>clang (llvm) or gcc (gnu)</li>
<li>cmake</li>
@@ -293,9 +293,9 @@ for the JavaScript code in this tag.
</div>
</div>
-<div id="outline-container-org0c0a491" class="outline-3">
-<h3 id="org0c0a491">compiler</h3>
-<div class="outline-text-3" id="text-org0c0a491">
+<div id="outline-container-org6cf0688" class="outline-3">
+<h3 id="org6cf0688">compiler</h3>
+<div class="outline-text-3" id="text-org6cf0688">
<div class="org-src-container">
<pre class="src src-sh">&gt; export <span style="color: #baba36;">CC</span>=clang
<span style="color: #656565;"># </span><span style="color: #757575;">or</span>
@@ -305,9 +305,9 @@ for the JavaScript code in this tag.
</div>
</div>
-<div id="outline-container-org7ba7a71" class="outline-3">
-<h3 id="org7ba7a71">make</h3>
-<div class="outline-text-3" id="text-org7ba7a71">
+<div id="outline-container-org0b93260" class="outline-3">
+<h3 id="org0b93260">make</h3>
+<div class="outline-text-3" id="text-org0b93260">
<div class="org-src-container">
<pre class="src src-sh"><span style="color: #656565;"># </span><span style="color: #757575;">clone the repo</span>
&gt; cd ~/code; git clone https://gitlab.com/grm-grm/ck
@@ -325,13 +325,13 @@ for the JavaScript code in this tag.
</div>
</div>
-<div id="outline-container-org5cb365e" class="outline-2">
-<h2 id="org5cb365e">for devs</h2>
-<div class="outline-text-2" id="text-org5cb365e">
+<div id="outline-container-orgefaaf9e" class="outline-2">
+<h2 id="orgefaaf9e">for devs</h2>
+<div class="outline-text-2" id="text-orgefaaf9e">
</div>
-<div id="outline-container-org148ba3a" class="outline-3">
-<h3 id="org148ba3a">CMake options</h3>
-<div class="outline-text-3" id="text-org148ba3a">
+<div id="outline-container-orgd6a17aa" class="outline-3">
+<h3 id="orgd6a17aa">CMake options</h3>
+<div class="outline-text-3" id="text-orgd6a17aa">
<p>
cmake accepts the following options:
</p>
@@ -371,9 +371,9 @@ llvm has better asan than gcc, so I use that.
</div>
</div>
-<div id="outline-container-org20e80d6" class="outline-3">
-<h3 id="org20e80d6">tests</h3>
-<div class="outline-text-3" id="text-org20e80d6">
+<div id="outline-container-org24ae1c0" class="outline-3">
+<h3 id="org24ae1c0">tests</h3>
+<div class="outline-text-3" id="text-org24ae1c0">
<p>
The testing "suite" is a bash script that runs regression
and unit tests. Regression tests are under the <code>tests/</code> directory
@@ -382,9 +382,9 @@ under <code>unit/</code> directory and test the code.
</p>
</div>
-<div id="outline-container-org75775b9" class="outline-4">
-<h4 id="org75775b9">run tests</h4>
-<div class="outline-text-4" id="text-org75775b9">
+<div id="outline-container-org3643483" class="outline-4">
+<h4 id="org3643483">run tests</h4>
+<div class="outline-text-4" id="text-org3643483">
<p>
First make sure you build ck with the <code>-DCK_TESTS=1</code> option. Then
go to the build directory and type:
@@ -396,9 +396,9 @@ go to the build directory and type:
</div>
</div>
-<div id="outline-container-orgf7207a9" class="outline-4">
-<h4 id="orgf7207a9">test suite</h4>
-<div class="outline-text-4" id="text-orgf7207a9">
+<div id="outline-container-org4d8845f" class="outline-4">
+<h4 id="org4d8845f">test suite</h4>
+<div class="outline-text-4" id="text-org4d8845f">
<div class="org-src-container">
<pre class="src src-sh">$ ./test-ck -h
ck test suite
@@ -416,9 +416,9 @@ flags:
</div>
</div>
</div>
-<div id="outline-container-org3401884" class="outline-2">
-<h2 id="org3401884">manual</h2>
-<div class="outline-text-2" id="text-org3401884">
+<div id="outline-container-orga1fc528" class="outline-2">
+<h2 id="orga1fc528">manual</h2>
+<div class="outline-text-2" id="text-orga1fc528">
<p>
ck's goal is to assist with the configuration file management.
To that end it tries to provides a cli interface that is pretty straight-forward
@@ -469,9 +469,9 @@ of flags one has to pass to ck.
</p>
</div>
-<div id="outline-container-org41c11d4" class="outline-3">
-<h3 id="org41c11d4">ck configuration</h3>
-<div class="outline-text-3" id="text-org41c11d4">
+<div id="outline-container-org120ab66" class="outline-3">
+<h3 id="org120ab66">ck configuration</h3>
+<div class="outline-text-3" id="text-org120ab66">
<p>
ck uses sqlite to index the configuration files. The init
action creates a <b>.ck</b> directory (under $HOME)
@@ -513,13 +513,13 @@ $ ck -c /someplace/else ...
</div>
</div>
-<div id="outline-container-org72890ad" class="outline-3">
-<h3 id="org72890ad">Actions</h3>
-<div class="outline-text-3" id="text-org72890ad">
+<div id="outline-container-orgf813874" class="outline-3">
+<h3 id="orgf813874">Actions</h3>
+<div class="outline-text-3" id="text-orgf813874">
</div>
-<div id="outline-container-org3b0ec54" class="outline-4">
-<h4 id="org3b0ec54">init</h4>
-<div class="outline-text-4" id="text-org3b0ec54">
+<div id="outline-container-org999a834" class="outline-4">
+<h4 id="org999a834">init</h4>
+<div class="outline-text-4" id="text-org999a834">
<p>
or i or -i
</p>
@@ -549,9 +549,9 @@ $ ck init /path_to/where_you_want/your_configs/to_be <span style="color: #bdbc61
</div>
</div>
-<div id="outline-container-orgc9498d4" class="outline-4">
-<h4 id="orgc9498d4">add</h4>
-<div class="outline-text-4" id="text-orgc9498d4">
+<div id="outline-container-org202a2f7" class="outline-4">
+<h4 id="org202a2f7">add</h4>
+<div class="outline-text-4" id="text-org202a2f7">
<p>
or a or -a
</p>
@@ -592,9 +592,9 @@ $ ck add program_name config_path [-s] [-p]
</div>
</div>
-<div id="outline-container-orge78ef4d" class="outline-4">
-<h4 id="orge78ef4d">list</h4>
-<div class="outline-text-4" id="text-orge78ef4d">
+<div id="outline-container-orgb7f4676" class="outline-4">
+<h4 id="orgb7f4676">list</h4>
+<div class="outline-text-4" id="text-orgb7f4676">
<p>
or ls or l or -l
</p>
@@ -657,11 +657,11 @@ $ ck -l ckconf
</div>
</div>
-<div id="outline-container-org914dcb8" class="outline-4">
-<h4 id="org914dcb8">search</h4>
-<div class="outline-text-4" id="text-org914dcb8">
+<div id="outline-container-org01e2cdb" class="outline-4">
+<h4 id="org01e2cdb">search</h4>
+<div class="outline-text-4" id="text-org01e2cdb">
<p>
-or s or -s
+or grep or s or -s
</p>
<p>
@@ -683,11 +683,11 @@ Usage:
<pre class="src src-sh"><span style="color: #656565;"># </span><span style="color: #757575;">search for parenthesis</span>
$ ck search <span style="color: #bdbc61;">\(</span>
<span style="color: #656565;"># </span><span style="color: #757575;">search term with spaces</span>
-$ ck search <span style="color: #bdbc61;">"This is a space"</span>
+$ ck grep <span style="color: #bdbc61;">"This is a space"</span>
<span style="color: #656565;"># </span><span style="color: #757575;">both</span>
-$ ck search <span style="color: #bdbc61;">"(add 2 4)"</span>
+$ ck s <span style="color: #bdbc61;">"(add 2 4)"</span>
<span style="color: #656565;"># </span><span style="color: #757575;">and a normal one</span>
-$ ck search alias
+$ ck -s alias
</pre>
</div>
@@ -708,9 +708,9 @@ $ for i ($(ck ls paths)) grep -E <span style="color: #bdbc61;">'A|B'</span> $<sp
</div>
</div>
-<div id="outline-container-orga1030cc" class="outline-4">
-<h4 id="orga1030cc">edit</h4>
-<div class="outline-text-4" id="text-orga1030cc">
+<div id="outline-container-org1d8ff57" class="outline-4">
+<h4 id="org1d8ff57">edit</h4>
+<div class="outline-text-4" id="text-org1d8ff57">
<p>
or e or -e
</p>
@@ -759,7 +759,7 @@ $ ck edit emacs accounts.el
</div>
</div>
<div id="postamble" class="status">
-<p class="date">Created: 2018-10-09 Tue 20:53</p>
+<p class="date">Created: 2018-10-09 Tue 20:56</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
diff --git a/README.org b/README.org
index c03a093..4f4fc52 100644
--- a/README.org
+++ b/README.org
@@ -239,7 +239,7 @@ Usage:
#+END_SRC
*** search
-or s or -s
+or grep or s or -s
Perform infile grep in all the configurations ck keeps track of.
@@ -252,11 +252,11 @@ Usage:
# search for parenthesis
$ ck search \(
# search term with spaces
- $ ck search "This is a space"
+ $ ck grep "This is a space"
# both
- $ ck search "(add 2 4)"
+ $ ck s "(add 2 4)"
# and a normal one
- $ ck search alias
+ $ ck -s alias
#+END_SRC
If you want to use more advanced grep techniques or even
diff --git a/src/actionparser.c b/src/actionparser.c
index 1da1d2f..be96bb3 100644
--- a/src/actionparser.c
+++ b/src/actionparser.c
@@ -27,7 +27,7 @@ const char* const strADD[] = {"3", "add", "a", "-a"};
const char* const strDEL[] = {"4", "delete", "del","d", "-d"};
const char* const strEDIT[] = {"3", "edit", "e", "-e"};
const char* const strLIST[] = {"5", "list", "ls", "l", "-l", "-ls"};
-const char* const strSEARCH[] = {"3", "search", "s", "-s"};
+const char* const strSEARCH[] = {"4", "search", "grep", "s", "-s"};
const char* const strHELP[] = {"5", "help", "h", "-?", "-h", "--help"};
const char* const strConfDir[] = {"4", "config", "conf", "c", "-c"};
const char* const strVersion[] = {"2", "version", "--version"};