From dd92cb9f2967d201a35bf7fbd382127e4a87a90d Mon Sep 17 00:00:00 2001 From: marcelarie Date: Mon, 14 Oct 2024 21:17:43 +0200 Subject: [PATCH] add diagram --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 41cc427..2e91562 100644 --- a/README.md +++ b/README.md @@ -36,14 +36,40 @@ The converted aliases are written to a file. You can either generate them manually or use the Nushell environment. If using the environment method, the file will regenerate at the start of each shell session. +**Diagram:** +Its not that complex but I always wanted to try this out. +```mermaid +--- +config: + theme: dark + look: classic + layout: dagre +--- +graph TD + A[CLI App in Rust] --> B[Parse Bash with Tree-sitter] + B --> C[Convert to Nushell format] + C --> D[Validate Alias Syntax] + D --> E[Write Valid Aliases to File] + E --> F[Manual Method] + E --> G[Nushell Environment Method] + G --> H[Regenerate File at Each Shell Session] + D --> I[Comment Out Invalid Aliases] + I --> J[Include Parsing Error Information] +``` + + + + ## Usage current implementation: + ```bash nu-alias-converter .bash_aliases # will generate a alias.nu file in the same directory ``` in the future it will work like this: + ```bash nu-alias-converter .bash_aliases --out /path/to/nushell/nushell_aliases.nu ```