mirror of
https://github.com/mickael-menu/zk
synced 2024-11-15 12:12:56 +00:00
43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
|
# Print help for `zk init`
|
||
|
$ zk init --help
|
||
|
>Usage: zk init [<directory>]
|
||
|
>
|
||
|
>Create a new notebook in the given directory.
|
||
|
>
|
||
|
>Arguments:
|
||
|
> [<directory>] Directory containing the notebook.
|
||
|
>
|
||
|
>Flags:
|
||
|
> -h, --help Show context-sensitive help.
|
||
|
> --notebook-dir=PATH Turn off notebook auto-discovery and set manually
|
||
|
> the notebook where commands are run.
|
||
|
> -W, --working-dir=PATH Run as if zk was started in <PATH> instead of the
|
||
|
> current working directory.
|
||
|
> --no-input Never prompt or ask for confirmation.
|
||
|
|
||
|
# Creates a new notebook in a new directory.
|
||
|
$ zk init --no-input new-dir
|
||
|
>
|
||
|
>Initialized a notebook in {{working-dir}}/new-dir
|
||
|
|
||
|
$ test -f new-dir/.zk/config.toml
|
||
|
|
||
|
# Creates a new notebook in an existing directory.
|
||
|
$ mkdir existing-dir
|
||
|
|
||
|
$ zk init --no-input existing-dir
|
||
|
>
|
||
|
>Initialized a notebook in {{working-dir}}/existing-dir
|
||
|
|
||
|
$ test -f existing-dir/.zk/config.toml
|
||
|
|
||
|
# Creates a new notebook in the current directory.
|
||
|
$ mkdir cur-dir && cd cur-dir
|
||
|
|
||
|
$ zk init --no-input
|
||
|
>
|
||
|
>Initialized a notebook in {{working-dir}}
|
||
|
|
||
|
$ test -f .zk/config.toml
|
||
|
|