summary refs log tree commit diff
path: root/kbfunc.c
diff options
context:
space:
mode:
authoroga <oga>2008-04-15 21:20:56 +0000
committeroga <oga>2008-04-15 21:20:56 +0000
commitd5794a6b0278433d4a5d288543f74770399e3a91 (patch)
treed0b7590d71fd49176cdde9622c30685bfcf69630 /kbfunc.c
parent887a5aa65f255ac0ae4fdc2e7a3ad1c94a435da8 (diff)
downloadcwm-d5794a6b0278433d4a5d288543f74770399e3a91.tar.gz
cwm-d5794a6b0278433d4a5d288543f74770399e3a91.tar.xz
cwm-d5794a6b0278433d4a5d288543f74770399e3a91.zip
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@.
Diffstat (limited to 'kbfunc.c')
-rw-r--r--kbfunc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kbfunc.c b/kbfunc.c
index 2b2eeab..a512137 100644
--- a/kbfunc.c
+++ b/kbfunc.c
@@ -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!");