From fe781e5ae7116733e5b335a0ac016af97266db5f Mon Sep 17 00:00:00 2001 From: Anastasis Grammenos Date: Mon, 8 Oct 2018 23:47:07 +0300 Subject: Way better Edit --- README.org | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) (limited to 'README.org') diff --git a/README.org b/README.org index 13c126e..446ff02 100644 --- a/README.org +++ b/README.org @@ -67,14 +67,15 @@ and are bash scripts that test =ck= functionality. Unit tests reside under =unit/= directory and test the code. *** run tests -Simply go to the build dir and type. +First make sure you build ck with the =-DCK_TESTS=1= option. Then +go to the build directory and type: #+BEGIN_SRC sh -$ ./check_ck +$ ./test-ck #+END_SRC *** test suite #+BEGIN_SRC sh -$ ./check_ck -h +$ ./test-ck -h ck test suite use without flags to run all tests @@ -259,11 +260,30 @@ a different pattern matching program you can do it like so: *** edit or e or -e -==--WIP--== +Edit configurations with =$EDITOR=. -Currently edit can only edit the primary config of a program. +Edit takes at least one and up to two arguments. -To do it use: +The first argument is the *programName*. If the program has a primary configuration +edit will open this. If the program has only one configuration edit will open it. +If the program has more than 1 configurations and no primary, it will print the +avaliable configurations and exit. + +The second argument is the *configName*. If it exists it will open, else it will +print the avaliable configurations and exit. + +Usage: #+BEGIN_SRC sh -$ ck edit program_name +# suppose this is our ck instance +$ ck list tree -a +emacs: +|- init.el +|- accounts.el [s] +|- orgconf.org [p] + +# edit the primary emacs config +$ ck edit emacs + +# edit a specific emacs config, other than the primary +$ ck edit emacs accounts.el #+END_SRC -- cgit v1.2.3