process icon indicating copy to clipboard operation
process copied to clipboard

unexpected result for creating directory tree using callProcess or callCommand

Open pucsdian opened this issue 2 years ago • 1 comments

shell command :-

mkdir -p ./{new/{new1,new2},old}

tested with :-

callProcess "mkdir" ["-p" , "./{new/{new1,new2},old}"] callCommand "mkdir -p ./{new/{new1,new2},old}"

result :-

. ├── {new │ └── {new1,new1},old}

expected output :-

tree . . ├── new │   ├── new1 │   └── new1 └── old

I printed shell command with :- showCommandForUser "mkdir" ["-p" , "./{new/{new1,new2},old}"]

output :- "mkdir -p './{new/{new1,new2},old}'"

this single single quotes around directory name causing problem how can i fix this

pucsdian avatar Aug 19 '22 11:08 pucsdian

The {} syntax is brace expansion from bash (https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Brace-Expansion). You will need to run your expression through bash to get the behavior you are after.

joehealy avatar Apr 18 '23 01:04 joehealy