From 4d0db9eab5c94e46f1d8c1fa0b6c0c4963788dcf Mon Sep 17 00:00:00 2001 From: Priyanshu Thapliyal Date: Sun, 22 Dec 2024 17:26:36 +0530 Subject: [PATCH 1/2] fix(docs): Update README for Windows Bash auto-completion and correct environment paths Signed-off-by: Priyanshu Thapliyal --- 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. From 6b4f5c735cca155e59d8eba4a594e201dfa4abf7 Mon Sep 17 00:00:00 2001 From: Priyanshu Thapliyal Date: Mon, 23 Dec 2024 07:02:51 +0530 Subject: [PATCH 2/2] update window bash to git bash Signed-off-by: Priyanshu Thapliyal --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e2ac7d1..b7fc379 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ $ cocli completion bash > ~/.bash_completion.d/cocli $ . ~/.bash_completion ``` -If you are setting up in Windows Bash, you can use: +If you are using Git Bash or a similar environment, you would do something like: ``` $ mkdir -p ~/.local/share/bash-completion/completions $ cocli completion bash > ~/.local/share/bash-completion/completions/cocli