From aec0f964543e890aeeead129b15517e2df188afa Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 4 Apr 2026 12:03:29 +0200 Subject: [PATCH] Playground: clarify shell vs. coreutils responsibilities in docs Explain that constructs like if/while/for, globbing, and variable expansion are shell features, not coreutils features, and why they are not available in the playground's minimal JS shell. --- content/playground-how-it-works.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/playground-how-it-works.md b/content/playground-how-it-works.md index 0f3c96421..836b79e2d 100644 --- a/content/playground-how-it-works.md +++ b/content/playground-how-it-works.md @@ -150,6 +150,12 @@ Supported shell features: **Not** supported (by design, to keep it simple): variables (`$VAR`), subshells, `&&`/`||`, globbing. +### Shell vs. Coreutils: Who Does What? + +It's important to understand that **coreutils only provides individual commands** like `sort`, `cat`, `ls`, etc. Features like `if`/`then`/`else`, `while` loops, `for` loops, variable expansion (`$VAR`), and globbing (`*.txt`) are all **shell features** — they are provided by a shell such as Bash or Zsh, not by coreutils. + +Since the playground implements only a minimal shell (pipes, redirections, quoting, and a few builtins), these shell constructs are not available. This isn't a limitation of uutils itself — it's simply because the playground's JavaScript shell is intentionally lightweight and doesn't include a full shell language interpreter. + ## The Rust Side: Building Coreutils for WebAssembly ### Compilation Target