diff --git a/README.md b/README.md index 79022ac2..b6c37766 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Generates [Nushell](https://github.com/nushell/nushell) completions for [`clap`] [![Crates.io](https://img.shields.io/crates/d/clap_complete_nushell)](https://crates.io/crates/clap_complete_nushell) [![License](https://img.shields.io/github/license/nibon7/clap_complete_nushell)](LICENSE) [![docs.rs](https://img.shields.io/docsrs/clap_complete_nushell)](https://docs.rs/clap_complete_nushell) -[![Build Status](https://img.shields.io/github/workflow/status/nibon7/clap_complete_nushell/CI/main)](https://github.com/nibon7/clap_complete_nushell/actions/workflows/ci.yml?query=branch%3Amain) +[![Build Status](https://img.shields.io/github/actions/workflow/status/nibon7/clap_complete_nushell/ci.yml)](https://github.com/nibon7/clap_complete_nushell/actions/workflows/ci.yml?query=branch%3Amain) [![GitHub last commit](https://img.shields.io/github/last-commit/nibon7/clap_complete_nushell)](https://github.com/nibon7/clap_complete_nushell/commits/main) ## Examples @@ -63,6 +63,7 @@ fn main() { generate(Nushell, &mut cmd, "myapp", &mut io::stdout()); } + ``` ### myapp.nu diff --git a/scripts/gen_readme.nu b/scripts/gen_readme.nu index 4e8a5fe2..d4e7bf13 100755 --- a/scripts/gen_readme.nu +++ b/scripts/gen_readme.nu @@ -21,12 +21,12 @@ Generates [Nushell]\((generate_url $github nushell/nushell)\) completions for [` [![Crates.io]\((generate_url $baseurl crates/d $repo)\)]\((generate_url $crates crates $repo)\) [![License]\((generate_url $baseurl github/license $user)/(generate_url $repo)\)]\(LICENSE\) [![docs.rs]\((generate_url $baseurl docsrs $repo)\)]\((generate_url $docs $repo)\) -[![Build Status]\((generate_url $baseurl github/workflow/status $user $repo CI $branch)\)]\((generate_url $github $user $repo actions/workflows/ci.yml?query=branch%3A($branch))\) +[![Build Status]\((generate_url $baseurl github/actions/workflow/status $user $repo ci.yml)\)]\((generate_url $github $user $repo actions/workflows/ci.yml?query=branch%3A($branch))\) [![GitHub last commit]\((generate_url $baseurl github/last-commit $user $repo)\)]\((generate_url $github $user $repo commits/($branch))\)\n\n" } def code_to_md [title: string, lang: string, code: string] { - $"### ($title)\n\n```($lang)\n($code)```\n" + $"### ($title)\n\n```($lang)\n($code)\n```\n" } def generate_md [file: path] { @@ -45,7 +45,7 @@ def generate_md [file: path] { |append $rust_example |append $nu_example |str join "\n" - |save -r README.md + |save -r -f README.md } generate_md $example_file