{\ttfamily kdb editor $<$path$>$ \mbox{[}$<$format$>$\mbox{]}}

Where {\ttfamily path} is the destination where the user wants to edit keys and {\ttfamily format} is the format in which the keys should be edited. If the {\ttfamily format} argument is not passed, then the default format will be used as determined by the value of the {\ttfamily sw/kdb/current/format} key. By default, that key contains {\ttfamily storage}. The {\ttfamily storage} plugin can be configured at compile-\/time or changed by the link {\ttfamily libelektra-\/storage.\+so}. The {\ttfamily format} attribute relies on Elektra’s plugin system to properly import the configuration. The user can view all plugins available for use by running the kdb-\/plugin-\/list(1) command. To learn about any plugin, the user can simply use the kdb-\/plugin-\/info(1) command.

This command allows a user to edit configuration of the key database using a text editor. The user should specify the format that the current configuration or keys are in, otherwise the default format will be used.


\begin{DoxyItemize}
\item 0\+: successful.
\item 1-\/10\+: standard exit codes, see \hyperlink{doc_help_kdb_md}{kdb(1)}
\item 11\+: could not export configuration.
\item 12\+: could not start editor.
\item 13\+: could not import configuration because of conflicts
\item 14\+: could not import configuration because of error during \hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()} (Most likely a validation error)
\end{DoxyItemize}


\begin{DoxyItemize}
\item {\ttfamily -\/H}, {\ttfamily -\/-\/help}\+: Show the man page.
\item {\ttfamily -\/V}, {\ttfamily -\/-\/version}\+: Print version info.
\item {\ttfamily -\/p}, {\ttfamily -\/-\/profile $<$profile$>$}\+: Use a different kdb profile.
\item {\ttfamily -\/C}, {\ttfamily -\/-\/color $<$when$>$}\+: Print never/auto(default)/always colored output.
\item {\ttfamily -\/s}, {\ttfamily -\/-\/strategy $<$name$>$}\+: Specify which strategy should be used to resolve conflicts.
\item {\ttfamily -\/v}, {\ttfamily -\/-\/verbose}\+: Explain what is happening. Prints additional information in case of errors/warnings.
\item {\ttfamily -\/d}, {\ttfamily -\/-\/debug}\+: Give debug information. Prints additional debug information in case of errors/warnings.
\item {\ttfamily -\/e}, {\ttfamily -\/-\/editor $<$editor$>$}\+: Which editor to use.
\item {\ttfamily -\/N}, {\ttfamily -\/-\/namespace}=$<$ns$>$\+: Specify the namespace to use when writing cascading keys ({\ttfamily validation} strategy only). See \href{#KDB}{\tt below in K\+DB}.
\end{DoxyItemize}


\begin{DoxyItemize}
\item {\ttfamily validate}\+: apply metadata as received from base, and then cut+append all keys as imported. If the appended keys do not have a namespace, the namespace given by {\ttfamily -\/N} is added.
\end{DoxyItemize}

The other strategies are implemented by the merge framework and are documented in \hyperlink{doc_help_elektra-merge-strategy_md}{elektra-\/merge-\/strategy(7)}.


\begin{DoxyItemize}
\item {\ttfamily /sw/elektra/kdb/\#0/current/format}\+: The default format if none given. Defaults to {\ttfamily storage} if the key does not exist.
\item {\ttfamily /sw/elektra/kdb/\#0/current/editor}\+: The default editor, if no {\ttfamily -\/e} option is given. Defaults to {\ttfamily /usr/bin/sensible-\/editor}, {\ttfamily /usr/bin/editor} or {\ttfamily /usr/bin/vi} if the key does not exist.
\item {\ttfamily /sw/elektra/kdb/\#0/current/namespace}\+: Specifies which default namespace should be used when setting a cascading name. By default the namespace is user, except {\ttfamily kdb} is used as root, then {\ttfamily system} is the default ({\ttfamily validate} strategy only).
\end{DoxyItemize}

To change the configuration in K\+DB below {\ttfamily user/ini} with {\ttfamily /usr/bin/vim}, you would use\+:~\newline
 {\ttfamily kdb editor -\/e /usr/bin/vim user/ini}

Or set a new editor as default using\+:~\newline
 {\ttfamily kdb set /sw/elektra/kdb/\#0/current/editor /usr/bin/nano}

To change the configuration in K\+DB below {\ttfamily user} in xml format, you would use\+:~\newline
 {\ttfamily kdb editor user xml}


\begin{DoxyItemize}
\item \hyperlink{doc_help_elektra-merge-strategy_md}{elektra-\/merge-\/strategy(7)}
\item \hyperlink{doc_help_elektra-key-names_md}{elektra-\/key-\/names(7)} for an explanation of key names. 
\end{DoxyItemize}