aboutsummaryrefslogtreecommitdiffstats
path: root/ck.1
diff options
context:
space:
mode:
authorAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-10-28 01:02:28 +0300
committerAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-10-28 01:02:28 +0300
commitde394e24d0dae3ff879295ab4574d2071c92b77d (patch)
tree0b8e6c086fc14df6b991d627bb84c963f23bba25 /ck.1
parent44b28c07a4a3cdbe4f84e57cfa55082956e300ba (diff)
downloadck-de394e24d0dae3ff879295ab4574d2071c92b77d.tar.gz
ck-de394e24d0dae3ff879295ab4574d2071c92b77d.tar.bz2
ck-de394e24d0dae3ff879295ab4574d2071c92b77d.zip
Work on manpage
Diffstat (limited to 'ck.1')
-rw-r--r--ck.1392
1 files changed, 387 insertions, 5 deletions
diff --git a/ck.1 b/ck.1
index b42aef4..8ddf4ef 100644
--- a/ck.1
+++ b/ck.1
@@ -109,9 +109,379 @@ instead of the default
.B \-\-version\fR, \fBversion
Print version and licence information, and quit.
.SH ACTIONS
-Pass the action after any
-.BR OPTIONS .
-
+Each
+.B action
+has several aliases. The selected
+.B action
+must be after the
+.B OPTIONS
+if any. All available
+.B actions
+can be seen in the
+.B SYNOPSIS
+section above.
+.P
+Each
+.B action
+takes a number of arguments and flags.
+.SS "Initialize ck"
+Create the
+.B ck
+database
+.RI ( ckdb )
+and initialize it. Create the ck config file
+.RI ( ckrc )
+and add the directory paths to it.
+.P
+.B USAGE
+.br
+.in +.2i
+.B ck init
+.I VERSION_CONTROL_DIR SECRET_DIR
+.P
+.B ALIASES
+.in +.2i
+.BR init , \ i , \ \-i
+.P
+.B ARGUMENTS
+.in +.2i
+.I VERSION_CONTROL_DIR
+.br
+.in +.2i
+The directory where
+.B configs
+will be stored by default.
+.B File must exist\fR.
+.P
+.in +.2i
+.I SECRET_DIR
+.br
+.in +.2i
+The directory where
+.B configs
+will be stored when using the
+.B \-s
+flag in
+.B add\fR. \fBFile must exist\fR.
+.br
+.P
+.B EXAMPLES
+.in +.2i
+.br
+$ ck init /home/ckuser/configs/vc home/ckuser/configs/sec
+.br
+$ ck i configs/vc configs/sec
+.SS "Add config"
+Add a
+.B config
+to the database
+.RI ( ckdb )\fR.
+Each
+.B config
+belongs to a
+.BR program .
+Every \fBprogram\fR can have
+multiple
+.B configs
+under it and one of them can be
+.BR primary .
+The
+.B edit action
+will open the
+.B primary config
+by default.
+.P
+.B USAGE
+.br
+.in +.2i
+.B ck add
+.I PROGRAM_NAME CONFIG_PATH
+.RB [ \-p ]
+.RB [ \-s ]
+.P
+.B ALIASES
+.in +.2i
+.BR add , \ a , \ \-a
+.P
+.B ARGUMENTS
+.in +.2i
+.I PROGRAM_NAME
+.br
+.in +.2i
+The name of the
+.B program
+the
+.B config
+belongs at.
+.P
+.in +.2i
+.I CONFIG_PATH
+.br
+.in +.2i
+Path to the
+.BR config .
+Can be relative.
+.P
+.B FLAGS
+.br
+.in +.2i
+.B \-s
+.br
+.in +.2i
+Mark the
+.B config
+as secret. It will be stored
+on the
+.IR SECRET_DIR .
+.P
+.in +.2i
+.B \-p
+.br
+.in +.2i
+Mark the
+.B config
+as primary. The
+.B edit action
+will open this by default.
+.P
+.B EXAMPLES
+.in +.2i
+.br
+# add emacs configs
+.br
+## primary config
+.br
+$ ck add emacs ~/.emacs.d/orgconf.org -p
+.br
+## secret config, with passwords
+.br
+$ ck add emacs ~/.emacs.d/accounts.org -s
+.br
+## another one for emacs
+.br
+$ ck add emacs ~/.emacs.d/init.el
+.SS "Delete config"
+Delete a
+.B config
+or a
+.B program
+from the database
+.RI ( ckdb )\fR.
+This will not touch the actual file and link. It is up to the user
+to handle it.
+.P
+.B USAGE
+.br
+.in +.2i
+.B ck delete
+.IR PROGRAM_NAME | \fR{\fB\-c \ \fICONFIG_PATH\fR}
+.P
+.B ALIASES
+.in +.2i
+.BR delete , \ del , \ d , \ \-d
+.P
+.B ARGUMENTS
+.in +.2i
+.I PROGRAM_NAME
+.br
+.in +.2i
+Delete the
+.B program
+and all it's
+.BR configs .
+.P
+.in +.2i
+.BI \-c \ CONFIG_PATH
+.in +.2i
+Delete the
+.BR config .
+This has to be the full path of the link as shown by the
+.B list action\fR.
+.P
+.B EXAMPLES
+.br
+$ ck delete emacs
+.br
+$ ck del -c /home/ckuser/.emacs.d/init.el
+.SS "List"
+List programs, configs and ck configuration values.
+.P
+.B USAGE
+.br
+.in +.2i
+.B ck list
+.BR tree \ [ \-a ]
+.br
+.B ck list
+.RB { -p \ \fIPROGRAM_NAME\fR}\fR| programs | paths \ [ \-t
+.RB { plain | python | lisp } \fR]
+.RB [ \-a ]
+.br
+.B ck list ckconf
+.br
+.P
+.B ALIASES
+.in +.2i
+.BR list , \ ls , \ l , \ -ls , \ \-l
+.P
+.B ARGUMENTS
+.in +.2i
+.B tree
+.in +.2i
+List
+.B programs
+with their
+.B configs
+in a tree like structure.
+.P
+.in +.2i
+.B paths
+.in +.2i
+List all the
+.B config
+paths
+.B ck
+keeps track of.
+.P
+.in +.2i
+.B programs
+.in +.2i
+List all the
+.B programs ck
+keeps track of.
+.P
+.in +.2i
+.BI \-c \ PROGRAM_NAME
+.in +.2i
+List all the
+.B configs
+of
+.IR PROGRAM_NAME .
+.P
+.in +.2i
+.BI ckconf
+.in +.2i
+List the
+.B ck
+configuration values, like the
+.IR VERSION_CONTROL_DIR \ and \ SECRET_DIR .
+.P
+.B FLAGS
+.in +.2i
+.B \-t
+.in +.2i
+Set the type of the
+.BR list .
+Can be either
+.B plain
+(the default) a simple list,
+.B python
+to print it like a python array or
+.B lisp
+to print it like a lisp list.
+.P
+.in +.2i
+.B \-a
+.in +.2i
+Add attributes to the listing (when aplicable).
+The attributes are
+.B [\-s]
+for secret and
+.B [\-p]
+for primary.
+.P
+.B EXAMPLES
+.in +.2i
+$ ck list tree -a
+.br
+$ ck list paths -t lisp
+.br
+$ ck list programs -t python
+.br
+$ ck list -p emacs
+.SS "Edit configs"
+.P
+.B USAGE
+.br
+.in +.2i
+.B ck edit
+.IR PROGRAM_NAME \ [ CONFIG_BASENAME ]
+.br
+.P
+.B ALIASES
+.in +.2i
+.BR edit , \ e , \ \-e
+.P
+.B ARGUMENTS
+.in +.2i
+.P
+.B EXAMPLES
+.in +.2i
+$ ck edit emacs
+.br
+$ ck e tmux .tmux.conf
+.SS "Search configs"
+.P
+.B USAGE
+.br
+.in +.2i
+.B ck search
+.I SEARCH_TERM
+.br
+.P
+.B ALIASES
+.in +.2i
+.BR search , \ grep , \ s , \ \-s
+.P
+.B ARGUMENTS
+.in +.2i
+.P
+.B EXAMPLES
+.in +.2i
+$ ck search "search term"
+.SS "Restore configs"
+.P
+.B USAGE
+.br
+.in +.2i
+.B ck restore
+.IR PROGRAM_NAME | \fBall
+.br
+.P
+.B ALIASES
+.in +.2i
+.BR restore , \ r , \ \-r
+.P
+.B ARGUMENTS
+.in +.2i
+.P
+.B EXAMPLES
+.in +.2i
+$ ck restore all
+.br
+$ ck restore -p emacs
+.SS "Get help"
+.P
+.B USAGE
+.br
+.in +.2i
+.B ck help
+.I action
+.P
+.B ALIASES
+.in +.2i
+.BR help , \ h , \ \-\-help , \ -h , \ \-?
+.P
+.B ARGUMENTS
+.in +.2i
+.P
+.B EXAMPLES
+.in +.2i
+$ ck help add
+.br
+$ ck h d
+.br
+$ ck --help ls
.SH EXIT STATUS
.B ck
shall return 0 if the action was completed without an error, -1 otherwise
@@ -121,7 +491,7 @@ By default
will store it's files in
.IR ~/.ck/ .
Using the
-.BR \-c | --config
+.BR \-c | \-\-config
one can change this.
.SS "ck generated files"
.TP
@@ -139,7 +509,19 @@ action, but can be changed by editing
.IR ckrc .
.TP
.I SECRET_DIR
-This is where the configuration files will end up when adding them with the -s flag. It's value is set with the
+This is where the configuration files will end up when adding them with the
+.B -s
+flag. It's value is set with the
.B init
action, but can be changed by editing
.IR ckrc .
+.SH BUILD VALUES
+.BR compiler :
+@CMAKE_C_COMPILER@
+.br
+.BR flags :
+@CMAKE_C_FLAGS@
+.SH VERSION
+ck version @ck_MAJOR_VERSION@.@ck_MINOR_VERSION@.@ck_PATCH_VERSION@
+.SH AUTHOR
+gramanas