On Sun, Nov 28, 2010 at 04:20:21PM -0500, Joseph Xu wrote:
> 
> 
> On 11/28/2010 06:22 AM, Aur??lien Aptel wrote:
> > On Sat, Nov 27, 2010 at 12:35 AM, Joseph Xu <joseph...@gmail.com> wrote:
> >> came up with. It relies on the shell that executes st to parse the
> >> arguments, so you can't run a command like st -e "touch arst", you have
> >> to run st -e touch arst. This also means you can't have any st arguments
> >> after the -e because they'll all be included in the command to run.
> > 
> > This breaks argument parsing. Why would you want to do that?
> > Josh's solution is better imo. I've pushed (a slight variation of) it to 
> > tip.
> 
> Not sure what you mean by breaking argument parsing. I think it's the
> simplest way to parse a command with complex quoted arguments correctly
> without having to run an extra shell process.
> 

Agree.  I prefer this patch to mine.  Mainly due to a bug(?) in
dmenu_run where everything is escaped before being executed by the
shell.  So, for example, I can't run `st -e "tmux a"` from dmenu_run,
since it parses it as st -e \"tmux a\" instead.  The xterm-like -e
behavior circumvents this issue.

Reply via email to