(text: string, ps: boolean)
| 172 | } |
| 173 | |
| 174 | function dynamic(text: string, ps: boolean) { |
| 175 | if (text.startsWith("(") || text.startsWith("@(")) return true |
| 176 | if (text.includes("$(") || text.includes("${") || text.includes("`")) return true |
| 177 | if (ps) return /\$(?!env:)/i.test(text) |
| 178 | return text.includes("$") |
| 179 | } |
| 180 | |
| 181 | function prefix(text: string) { |
| 182 | const match = /[?*[]/.exec(text) |