MCPcopy Create free account
hub / github.com/microsoft/Webwright / looksLikeShell

Function looksLikeShell

assets/compare_trajectory/app.js:392–394  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

390}
391
392function looksLikeShell(text) {
393 return /(^|\n)\s*(\$ |(?:cd|ls|pwd|cat|rg|sed|find|git|npm|pnpm|yarn|uv|python|python3|bash|sh|chmod|cp|mv|rm)\b)/m.test(String(text || ''));
394}
395
396function inferCodeLanguage(text, fallback = '') {
397 const normalizedFallback = normalizeCodeLanguage(fallback);

Callers 2

inferCodeLanguageFunction · 0.85
buildRichTextSectionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected