aboutsummaryrefslogtreecommitdiffstats
path: root/kbfunc.c
diff options
context:
space:
mode:
authoroga2008-04-15 21:20:56 +0000
committeroga2008-04-15 21:20:56 +0000
commit47b2f8d7fe9a817bb3b288ac7e047b08ab825e61 (patch)
treeb7835d22846b2c11a4e3247c6c7c38ed7ae3276e /kbfunc.c
parent4fe7a3740f967c868f91aa05868300e95af24727 (diff)
downloadcwm-47b2f8d7fe9a817bb3b288ac7e047b08ab825e61.tar.gz
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 '')
-rw-r--r--kbfunc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kbfunc.c b/kbfunc.c
index 6bd4841..44d1ac6 100644
--- a/kbfunc.c
+++ b/kbfunc.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: kbfunc.c,v 1.20 2008/04/15 20:24:41 oga Exp $
+ * $Id: kbfunc.c,v 1.21 2008/04/15 21:20:56 oga Exp $
*/
#include <paths.h>
@@ -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!");