Skip to content

Document Shell Syntax - Value 5 #70

@LSantha

Description

@LSantha

Shell Syntax

Document the Shell Syntax JNode concept in the wiki.

Value: 5

Concept Summary

Shell command parsing with MuParser and argument types. Shell Syntax provides the parsing and evaluation infrastructure for JNode's shell, enabling command-line interface and scripting capabilities.

Key Files

  • shell/src/shell/org/jnode/shell/syntax/SyntaxManager.java
  • shell/src/shell/org/jnode/shell/syntax/MuParser.java

Occurrences

~200 references in shell syntax package

Wiki Status

Partially covered (Syntax.md)

Bridges

Shell, Parsing, Command handling

Instructions

Skill to Use

Use the [[update-wiki|update-wiki skill]] (load with skill({ name: "update-wiki" })) for understanding JNode internals.

Context Research

Study SyntaxManager.java and MuParser.java to understand the parsing infrastructure. Review how commands are parsed, how arguments are processed, and how expressions are evaluated. Research the relationship between syntax parsing and command execution.

Update index.md

  • Pages table: Add entry for Shell-Syntax.md
  • Concepts → Pages table: Add "Shell Syntax" mapping to [[Shell-Syntax]]
  • Source Path → Pages table: Add mappings for shell/src/shell/org/jnode/shell/syntax/
  • Task Routing table: Add relevant task route(s)

Task Routing Suggestions

  1. Shell development: Shell Syntax is central to shell functionality
  2. Command parsing: Understanding parsing is key for command issues
  3. Expression evaluation: Shell can evaluate arithmetic expressions

Wiki Page Structure

# Shell Syntax

> Shell command parsing with MuParser and argument types.

## Overview
2-3 paragraph explanation of Shell Syntax, how command parsing works, and how the shell enables command-line interface and scripting.

## Key Components
| Class / File | Role |
|---|---|
| `shell/src/shell/org/jnode/shell/syntax/SyntaxManager.java` | Syntax manager and command registration |
| `shell/src/shell/org/jnode/shell/syntax/MuParser.java` | Expression parser |

## How It Works
Explanation of how shell syntax works, how commands are parsed, how arguments are handled, and how expressions are evaluated.

## Gotchas & Non-Obvious Behavior
- Command parsing must handle quoting and escaping
- Variable expansion and substitution must be handled carefully
- Expression evaluation must be type-safe

## Related Pages
- [[Shell-Commands]]
- [[Shell]]
- [[CLI]]

Related Concepts: Shell, Parsing, Command handling, CLI, MuParser

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions