···11fn help() {
22- println!("\n\nHELP: tangled-on-commit\n\n")
22+ println!("Help: tangled-on-commit
33+Listen for commits on a specified repository and execute a shell command.
44+55+CLI Arguments:
66+ `tangled-on-commit (-h | --help)`
77+ Displays this message
88+99+ `tangled-on-commit`
1010+ No specified handle, repo, or command. Falls back to config/env
1111+1212+ `tangled-on-commit SHELL`
1313+ Uses config/env for handle and repo
1414+1515+ `tangled-on-commit @HANDLE SHELL`
1616+ Uses config/env for repo
1717+1818+ `tangled-on-commit REPO SHELL`
1919+ Uses config/env for handle
2020+2121+ `tangled-on-commit @HANDLE/REPO SHELL`
2222+ `tangled-on-commit HANDLE REPO SHELL`
2323+ No config/env
2424+2525+JSON:
2626+ Loads the file `tangled-on-commit.json` from cwd if it exists.
2727+ Reads keys \"handle\", \"repo_name\", and \"shell\".
2828+ Unknown keys are ignored and any key can be ommitted
2929+ JSON is used if the arguments aren't passed to the CLI
3030+3131+Env:
3232+ Loads the environment variables `TANGLED_ON_COMMIT_HANDLE` and `TANGLED_ON_COMMIT_REPO_NAME`
3333+ Shell cannot be set by environment variables.
3434+ Env variables are used if relevant keys are ommitted an arguments aren't passed to the CLI.
3535+")
336}
437538#[derive(Debug)]
···164197165198 // couldnt resolve every value
166199 // print an error and quit
167167- println!("@{handle:?}/{repo_name:?}: {shell:?}");
200200+ println!("Unable to find a value for every setting. Missing values for:");
201201+ if handle.is_none() {println!("- handle");}
202202+ if repo_name.is_none() {println!("- repo_name");}
203203+ if shell.is_none() {println!("- shell");}
204204+ println!("\nRun `tangled-on-commit --help` to see the help message");
168205 return Err(());
169206}
170207