Skip to content

czajkub/bush

Repository files navigation

bush

Bash Upgraded SHell

  • Goal: improve the existing bash shell by removing arcane syntax conventions and simplifying syntax
  • Language: Zig
  • Parser Generator: Tree-sitter

Authors

Example program

// Operator precedence
$counter = 1 || 2 && 3 == 4 + 5 * -(6 + 7)

// function declaration
function add($a, $b) {
    return $a + $b
}

// loop
while $counter < 10 {
    // piped command with redirects
    cat test | cat > res.txt | cat &> res2.txt

    // function call
    $counter = $counter + $(add 1 2)
}

Generate parser

  1. Install Tree-sitter CLI
  2. Run tree-sitter generate grammar.js

Documentation

About

Bash Upgraded SHell - interpreted scripting language serving as an alternative to bash.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors