commit 3579ac24598343dff35517eea053a0a78a1237ed
parent 33acee2a700ceed98a7c892bf462e4b04d46bc96
Author: Georg Neis <gn@wmii.de>
Date: Sat, 18 Feb 2006 23:00:00 +0200
if output of wmiimenu is empty then don't try to execute it
the last patch has been reverted, it was insufficient and
not really the right place
Diffstat:
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/rc/extern b/rc/extern
@@ -1,13 +1,11 @@
#!9PREFIX/bin/rc
# clean the environment and execute the given command
-if(~ $#* 0)
- exit
-
PATH=$OLD_PATH
OLD_PATH=()
wmiircpid=()
apid=()
+cmd=()
home=()
ifs=()
pid=()
diff --git a/rc/wmiirc b/rc/wmiirc
@@ -140,9 +140,17 @@ while(event=`{read}) {
case $MODKEY-Control-q,y
xwrite /ctl quit
case $MODKEY-Control-p
- extern `{cat /tmp/ns.$USER.$DISPLAY/p.menu | wmiimenu} &
+ {
+ cmd=`{cat /tmp/ns.$USER.$DISPLAY/p.menu | wmiimenu}
+ if(! ~ $#cmd 0)
+ extern $cmd
+ } &
case $MODKEY-Control-a
- `{items CONFPREFIX/wmii-3:$HOME/.wmii-3 | wmiimenu} &
+ {
+ cmd=`{items CONFPREFIX/wmii-3:$HOME/.wmii-3 | wmiimenu}
+ if(! ~ $#cmd 0)
+ $cmd
+ } &
case $MODKEY-t
extern xterm -rv &
case $MODKEY-d