[dev] SHCMD(cmd): this may be a stupid question, but...

2010-01-06 Thread Thayer Williams
What does this line do exactly? /* helper for spawning shell commands in the pre dwm-5.0 fashion */ #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } I always assumed it was a way of launching applications without needing to define each application explicitly as a separate

Re: [dev] SHCMD(cmd): this may be a stupid question, but...

2010-01-06 Thread Dmitry Maluka
It just launches shell: "/bin/sh -c $CMD" where $CMD is your command string. Shell parses this string and launches all specified commands, with possible substitution, redirection, pipelining etc.

[dev] [dwm] Re: SHCMD(cmd): this may be a stupid question, but...

2010-01-06 Thread Thayer Williams
On Jan 06, 2010 at 10:06 AM, Thayer Williams wrote: > What does this line do exactly? > > /* helper for spawning shell commands in the pre dwm-5.0 fashion */ > #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } > > I always assumed it was a way of launching applications wi