Closed protesilaos closed 4 years ago
Each argument to the command should be in a different list element. No shell is used so you shouldn't do quoting as you would for the shell (and also you don't get shell expansions such as ~
or $HOME
both expanding to the home directory).
To run:
find "/path/to/dir" -type f -exec grep -ile "search" {} \;
use:
"find" "/path/to/dir" "-type" "f" "-exec" "grep" "-ile" "search" "{}" ";"
Notice that doesn't have extra quotes for "search" or the backslash on ";".
Internally async-completing-read
calls start-process
; that function, along with a few others, run programs directly without using a shell and have this pass-each-argument-separately interface.
Just to note that this can be closed. Thanks again!
Thank you @oantolin for making this!
I have been trying to make it read a
find
call, but it does not seem to work because it fails to parse my CLI arguments. My question is how exactly do you pass multiple arguments to a command.I tried several variations of the following, with
concat
,format
, etc.:The equivalent works on the command line, say:
For completeness, the same fails with
process-lines
so there is something with how args are to be passed.