From c8e78040fe7073b33900388040b37ebec1f25e65 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 13 May 2026 08:45:22 +0200 Subject: [PATCH] Hide `yes` from the playground command list `yes` ships in the WASM binary but its infinite output just spams the terminal, so filter it out of the generated WASM_COMMANDS list. Done in the workflow so a single regex covers both autocomplete/help (via AVAILABLE_COMMANDS) and the rendered prose section. --- .github/workflows/website.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index bdf949531..f775a78f5 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -140,9 +140,13 @@ jobs: echo "Available locales: $locales" # Generate the list of available commands from the feat_wasm feature # in Cargo.toml so the playground stays in sync with the WASM build. + # HIDDEN_CMDS: utilities that ship in the binary but we don't want to + # advertise in the playground (e.g. `yes` produces infinite output + # that just spams the terminal). + HIDDEN_CMDS='^(yes)$' commands=$(sed -n '/^feat_wasm = \[/,/^\]/p' Cargo.toml \ | grep -oE '"[a-zA-Z0-9_]+"' | tr -d '"' \ - | sort -u | paste -sd, -) + | sort -u | grep -vE "$HIDDEN_CMDS" | paste -sd, -) echo "const WASM_COMMANDS = [$(echo "$commands" | sed 's/[^,]*/\"&\"/g')];" \ > ../uutils.github.io/static/wasm/commands.js echo "Available commands: $commands"