aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar Mason Larobina <mason.larobina@gmail.com>2009-12-17 19:29:36 +0800
committerGravatar Mason Larobina <mason.larobina@gmail.com>2009-12-17 20:56:10 +0800
commit227ea04a300da1d0f721721a213ae76632443b90 (patch)
tree4c708178a82810d23cf740f14c13d82cb45dbb6f /examples
parentffbf2c2aa3a8b8c3965a2f8f9d001815c8c46cc7 (diff)
New bind class that's onexec & nonarg when a bind ends in a '!'.
Diffstat (limited to 'examples')
-rw-r--r--examples/data/uzbl/plugins/bind.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/data/uzbl/plugins/bind.py b/examples/data/uzbl/plugins/bind.py
index ee1e0c4..969dd18 100644
--- a/examples/data/uzbl/plugins/bind.py
+++ b/examples/data/uzbl/plugins/bind.py
@@ -169,13 +169,13 @@ class Bind(object):
# Is the binding a MODCMD or KEYCMD:
mod_cmd = ismodbind(glob)
- # Execute the command on UPDATES or EXEC's:
- on_exec = True if glob.endswith('_') else False
+ # Do we execute on UPDATES or EXEC events?
+ on_exec = True if glob[-1] in ['!', '_'] else False
- # Does the command store arguments:
+ # Does the command take arguments?
has_args = True if glob[-1] in ['*', '_'] else False
- glob = glob[:-1] if has_args else glob
+ glob = glob[:-1] if has_args or on_exec else glob
mods, glob = split_glob(glob)
stack.append((on_exec, has_args, mods, glob, index))