make the argument parser for commands accept quoted strings, while i'm

there make u_spawn use exec_wm (renamed to u_exec) for it's execution to
remove duplicated code.

This means constructs like this work in .cwmrc:

bind CM-t "ssh -Y 192.168.1.2 \"xterm -e top\""

or alternatively:

bind CM-t "ssh -Y 192.168.1.2 'xterm -e top'"

"in it goes" okan@.
This commit is contained in:
oga
2008-04-15 21:20:56 +00:00
parent 887a5aa65f
commit d5794a6b02
3 changed files with 28 additions and 17 deletions

View File

@ -359,7 +359,8 @@ kbfunc_exec(struct client_ctx *scratch, void *arg)
u_spawn(mi->text);
break;
case CWM_EXEC_WM:
exec_wm(mi->text);
u_exec(mi->text);
warn("%s", mi->text);
break;
default:
err(1, "kb_func: egad, cmd changed value!");