birsh

Crates.iobirsh
lib.rsbirsh
version0.0.0
sourcesrc
created_at2023-03-20 13:44:08.296884
updated_at2023-03-20 13:44:08.296884
descriptionBash interpreter/compiler. Will not support all the functionalities.
homepagehttps://gitlab.com/lootved/irsh
repositoryhttps://gitlab.com/lootved/irsh
max_upload_size
id815290
size30,908
(LootVed)

documentation

README

Irsh

Description

Bash like interpreter and maybe compiler? Designed to be used as an interactive shell with minimal dependencies, will not support all bash syntax.

Features

  • support a unique bash syntax for variable/function declaration
  • always assume a { after a $ and that the brackets/parenthesis are correctly closed
  • ignore corner cases due to unclosed blocks/quote and crash for an easier (and faster?) implem
  • functions/program arguments with no default value are considered mandatory
  • one level of sub-command only
  • sub-commands can only be used at the beginning of double quoted string
  • sub-commands are limited to variables/words and redirection symbols
  • no support for nested quotes
  • no support (yet?) for multi-lines strings

Limitations

  • can fail on some edge cases
  • only &> redirection will be implemented
  • support only ${alphanum}, no $@ or $* or any other form
  • infinite loop if non closed sub-command
  • infinite loop if $() without the ""

Objectives

  • parse bash variables with scoping and defaults
  • parse bash functions via function keyword
  • support invocation of external commands
  • implement a subset of basic bash functionalities
  • support stdout/err redirections
Commit count: 61

cargo fmt