(token: string)
| 161 | type SearchCommand = "rg" | "grep"; |
| 162 | |
| 163 | function stripOuterQuotes(token: string): string { |
| 164 | const trimmed = token.trim(); |
| 165 | if (trimmed.length < 2) { |
| 166 | return trimmed; |
| 167 | } |
| 168 | |
| 169 | const first = trimmed[0]; |
| 170 | const last = trimmed[trimmed.length - 1]; |
| 171 | if ((first === "'" && last === "'") || (first === '"' && last === '"')) { |
| 172 | return trimmed.slice(1, -1); |
| 173 | } |
| 174 | |
| 175 | return trimmed; |
| 176 | } |
| 177 | |
| 178 | function isMatchAllSearchPattern(pattern: string): boolean { |
| 179 | // Intentionally narrow: we only want to warn on obvious whole-file dump patterns |
no outgoing calls
no test coverage detected