Skip to content

Commit

Permalink
add diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelarie committed Oct 14, 2024
1 parent 73f9933 commit dd92cb9
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
```
<!-- <div align="center"> -->
<!-- <img src="https://github.com/user-attachments/assets/4953aa13-8c6c-4e1a-b463-436971ee06b7" alt="Mermaid diagram" width="700"> -->
<!-- </div> -->

## 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
```

0 comments on commit dd92cb9

Please sign in to comment.