From 012586cd7fceec2270e210ef1187ffd7c4784789 Mon Sep 17 00:00:00 2001 From: Priyanshu Thapliyal Date: Sun, 22 Dec 2024 17:26:36 +0530 Subject: [PATCH] fix(docs): Update README for Windows Bash auto-completion and correct environment paths --- README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 041778e..e2ac7d1 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,18 @@ To install the `cocli` command, do: ``` $ go install github.com/veraison/cocli@latest ``` - -To configure auto-completion, use the `completion` subcommand. For example, if -`bash` is your shell, you would do something like: +To configure auto-completion, use the `completion` subcommand. For example, if `bash` is your shell, you would do something like: ``` $ cocli completion bash > ~/.bash_completion.d/cocli $ . ~/.bash_completion ``` + +If you are setting up in Windows Bash, you can use: +``` +$ mkdir -p ~/.local/share/bash-completion/completions +$ cocli completion bash > ~/.local/share/bash-completion/completions/cocli +$ source ~/.local/share/bash-completion/completions/cocli +``` to get automatic command completion and suggestions using the TAB key. To get a list of the supported shells, do: @@ -231,7 +236,7 @@ Use the `cots create` subcommand to create a CBOR-encoded CoTS. The `environment ``` -$ cocli cots create --environment data/cots/env/vendor.json --tafile data/cots/shared_ta.ta +$ cocli cots create --environment data/cots/templates/env/vendor.json --tafile data/cots/shared_ta.ta ``` On success, you should see something like the following printed to stdout: ``` @@ -242,7 +247,7 @@ The CBOR-encoded CoTS file is stored in the current working directory with a name derived from its environment template. If you want, you can specify a different target directory and file name using the `--output` command line switch (abbrev. `-o`) ``` -$ cocli cots create --environment data/cots/env/vendor.json --tafile data/cots/shared_ta.ta --output /tmp/myCots.cbor +$ cocli cots create --environment data/cots/templates/env/vendor.json --tafile data/cots/shared_ta.ta --output /tmp/myCots.cbor >> created "/tmp/myCots.cbor" ``` Note that the output directory, as well as all its parent directories, MUST pre-exist.