1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! POSIX Shell implementation
//!
//! A minimal but functional shell supporting:
//! - Command execution
//! - Pipes (cmd1 | cmd2)
//! - Redirections (>, >>, <, 2>)
//! - Environment variables ($VAR)
//! - Variable assignment (VAR=value)
//! - Control structures (if/then/else/fi, for/do/done, while/do/done, case/esac)
//! - Command substitution $(cmd)
//! - Arithmetic expansion $((expr))
//! - Built-in commands (cd, exit, export, etc.)
//! - Script execution
//!
//! ## Module Organization
//!
//! The shell implementation is split into the following submodules:
//! - `state` - Shell state management (variables, exit status)
//! - `entry` - Entry points (sh, ash, dash) and interactive loop
//! - `parser` - Tokenization and command parsing
//! - `execute` - Script and pipeline execution
//! - `expand` - Variable and command substitution
//! - `arithmetic` - Arithmetic expression evaluation
//! - `control` - Control flow structures (if, while, for, case)
//! - `builtins` - Built-in commands
//! - `util` - Utility functions
// Re-export get_arg from parent for entry.rs
pub use get_arg;
// Re-export the public entry points
pub use ;
// Re-export items needed by submodules via super::
// These allow submodules to use `super::function_name` instead of fully qualified paths
pub use execute_script;
pub use expand_string;
pub use parse_word;
pub use skip_whitespace_and_comments;