[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Quote file name args to start-process-shell-command?
From: |
Eli Zaretskii |
Subject: |
Re: Quote file name args to start-process-shell-command? |
Date: |
Thu, 12 Oct 2006 06:54:57 -0400 |
> Cc: Eli Zaretskii <address@hidden>,
> Lennart Borgman <address@hidden>,
> address@hidden
> From: David Kastrup <address@hidden>
> Date: Thu, 12 Oct 2006 11:27:58 +0200
>
> However, I agree that `shell-quote-argument' would be inappropriate to
> apply on the arguments of `call-process-shell-command'. Only those
> characters responsible for splitting arguments into words should get
> quoted.
What about < and | and ` and ' and ~ and ! etc.? Some, if not all of
them also split arguments into words, and have other effects. We
should leave this to the shell.
Let's put it another way: an interface to invoking a shell eventually
boils down to calling `system' or its equivalent. A call to `system'
accepts a single string that is the command line to pass to the shell.
So any API wrapped around `system' eventually concatenates all the
portions of the command-line args into a single string, and that is
how applications should use such an API.
If one needs to pass several strings as separate arguments to a
subprogram (including a shell), one should use an appropriate API,
such as call-process.
- Re: Quote file name args to start-process-shell-command?, (continued)
- Re: Quote file name args to start-process-shell-command?, Stefan Monnier, 2006/10/13
- Re: Quote file name args to start-process-shell-command?, Eli Zaretskii, 2006/10/14
- Re: Quote file name args to start-process-shell-command?, Stefan Monnier, 2006/10/14
- Re: Quote file name args to start-process-shell-command?, Eli Zaretskii, 2006/10/14
- Re: Quote file name args to start-process-shell-command?, Stefan Monnier, 2006/10/15
- Re: Quote file name args to start-process-shell-command?, Eli Zaretskii, 2006/10/16
- Re: Quote file name args to start-process-shell-command?, Stefan Monnier, 2006/10/16
- Re: Quote file name args to start-process-shell-command?, Andreas Schwab, 2006/10/16
- Re: Quote file name args to start-process-shell-command?, Richard Stallman, 2006/10/16
- Re: Quote file name args to start-process-shell-command?, Richard Stallman, 2006/10/15
- Re: Quote file name args to start-process-shell-command?,
Eli Zaretskii <=
- Re: Quote file name args to start-process-shell-command?, David Kastrup, 2006/10/12
- Re: Quote file name args to start-process-shell-command?, Eli Zaretskii, 2006/10/12
- Re: Quote file name args to start-process-shell-command?, Richard Stallman, 2006/10/12
- Re: Quote file name args to start-process-shell-command?, Stefan Monnier, 2006/10/12
- Re: Quote file name args to start-process-shell-command?, Lennart Borgman, 2006/10/13
- Re: Quote file name args to start-process-shell-command?, Kim F. Storm, 2006/10/13
- Re: Quote file name args to start-process-shell-command?, Eli Zaretskii, 2006/10/13
- Re: Quote file name args to start-process-shell-command?, Eli Zaretskii, 2006/10/12
- Re: Quote file name args to start-process-shell-command?, David Kastrup, 2006/10/12
- Re: Quote file name args to start-process-shell-command?, Eli Zaretskii, 2006/10/12