shellWord
s as one word of a shell command: quoted if it has to be (a path with a space in it).
export function shellWord(s: string): string { return /^[\w@%+=:,./-]+$/.test(s) ? s : `'${s.replaceAll("'", `'\\''`)}'`; }
s as one word of a shell command: quoted if it has to be (a path with a space in it).
export function shellWord(s: string): string { return /^[\w@%+=:,./-]+$/.test(s) ? s : `'${s.replaceAll("'", `'\\''`)}'`; }