Skip to content

Commit

Permalink
improve README.md with information about ignoring aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelarie committed Oct 17, 2024
1 parent 7a60e93 commit f6179b0
Showing 1 changed file with 34 additions and 3 deletions.
37 changes: 34 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ config:
layout: dagre
---
graph TD
A[CLI App in Rust] --> B[Parse Bash with Tree-sitter]
B --> C[Convert to Nushell format]
A[CLI App in Rust] --> K[Read .aliasignore file]
A --> B[Parse Bash with Tree-sitter]
K --> L[Should ignore alias?]
B --> L
L -->|No| C[Convert to Nushell format]
L -->|Yes| M[Skip alias]
C --> D[Validate Alias Syntax]
D --> E[Write Valid Aliases to File]
D --> E[Write Valid Aliases to Nushell File]
E --> F[Manual Method]
E --> G[Nushell Environment Method]
G --> H[Regenerate File at Each Shell Session]
Expand All @@ -59,6 +63,33 @@ in the future it will work like this:
nu-alias-converter .bash_aliases --out /path/to/nushell/nushell_aliases.nu
```

### Ignoring Aliases

The user can ignore aliases by adding them to a `.aliasignore` file in the root
of the directory where `nu-alias-converter` is run.

The file should contain all the aliases that should be ignored, one per line:

```plaintext
ls
la
gst
```

This will not convert any of those aliases to nushell.

Another option is to ignore all the aliases that use a command, the syntax would
be the same but with a bang (`!`) in front of the command name:

```plaintext
la
gst
!ls
!htop
```

This will also ignore all the aliases that use `ls` and `htop`.

**TODO:**

**Parsing Bash Aliases**
Expand Down

0 comments on commit f6179b0

Please sign in to comment.