Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.22 KB

TODO.md

File metadata and controls

41 lines (31 loc) · 1.22 KB

TODO:

Parsing Bash Aliases

  • Use tree-sitter to parse Bash and get all aliases
  • Handle expand_aliases and shopt -s expand_aliases
    • Implement recursive handling

Conversion to Nushell Format

  • Convert aliases to Nushell format
  • Validate alias content to ensure it is valid Nushell (with nu-parser)

File Handling

  • Write the converted aliases to a file
    • Write once
    • Use Nushell env.nu
  • Handle multiple files in a directory
  • Handle non-Bash script files (zsh, fish)
  • Add .alias_ignore file to skip certain aliases during conversion
    • Ignore aliases by name
    • Ignore aliases by command
    • Check for .alias_ignore in the current directory
    • Check for .alias_ignore in nu config directory
  • Handle cases when no aliases are found in the file
  • Handle empty files

Flags and Modes

  • Add --help flag
  • Add --no-comments flag
  • Handle *.nu files error
  • Add --output flag to specify the output file path and name
  • Handle missing files
  • Add debug mode

Performance

  • Use rayon to parallelize the conversion process
    • Improved from 25 seconds to 5 seconds with a 28888 line aliases file ✅