X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=contrib%2Frules%2Frulc;fp=contrib%2Frules%2Frulc;h=f0cd6335d248194459076394ad83ea17fc7b3ff1;hb=a448bf314dbdfd3c3de9a077e4a6163dc45e40dd;hp=339954a3bc95126067c6f0a3884680481a39c579;hpb=948b8046f723f437864153d6fa832b2adc54d17b;p=bspwm.git diff --git a/contrib/rules/rulc b/contrib/rules/rulc index 339954a..f0cd633 100755 --- a/contrib/rules/rulc +++ b/contrib/rules/rulc @@ -39,6 +39,10 @@ for opt, optarg, optind, longind in p.getopt(arg, short, long) do data_idx = optind end +if not cmd then + os.exit(1) +end + local msg = cmd if cmd == "test" then msg = string.format("%s {class=%q, instance=%q, title=%q, type=%q, state=%q}", msg, arg[data_idx], arg[data_idx+1], arg[data_idx+2], arg[data_idx+3], arg[data_idx+4])