1use crate::version::BONNIE_VERSION;
2
3pub fn help(output: &mut impl std::io::Write) {
4 writeln!(
5 output,
6 "Bonnie v{version} help page:
7------------------------
8
9Bonnie is a command aliasing tool that supports extremely simple and extremely advanced syntax. For the full reference, please see the documentation at https://github.com/arctic-hen7/bonnie/wiki.
10This just summarizes the functionality of this command, not the syntax of Bonnie configuration files!
11
12-h, --help prints this help page
13-v, --version prints the current version of Bonnie
14-i, --init [-t, --template <template-file>] creates a new `bonnie.toml` configuration (or whatever's set in `BONNIE_CONF`), using the specified template file if provided
15-c, --cache caches the Bonnie configuration file to `.bonnie.cache.json` for performance (this cache must be MANUALLY updated by re-running this command!)
16
17help [command-name] prints the help page for the current Bonnie configuration or for the given command
18
19The expected location of a Bonnie configuration file can be changed from the default `./bonnie.toml` by setting the `BONNIE_CONF` environment variable.
20The expected location of a Bonnie cache file can be changed from the default `./.bonnie.cache.json` by setting the `BONNIE_CACHE` environment variable.
21The expected location of your default template can be changed from the default `~/.bonnie/template.toml` by setting the `BONNIE_TEMPLATE` environment variable.
22
23Further information can be found at https://github.com/arctic-hen7/bonnie/wiki.",
24 version = BONNIE_VERSION
25 )
26 .expect("Failed to write help page.")
27}