diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2010-01-02 19:02:03 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2010-01-02 19:02:03 +0100 |
commit | 02995443bc8af38fc3bb3896c8d32eb0adc142d0 (patch) | |
tree | 1aa3e26476b7f581f23c0ae6e17870967c3563d1 /examples/data/uzbl/plugins/cmd_expand.py | |
parent | 30b7d1630e487f01f0f2ddc0fffca9d492213619 (diff) | |
parent | a5f014de5f76169a38ee67e46a0526e5d80a3433 (diff) |
merge in changes from master
Diffstat (limited to 'examples/data/uzbl/plugins/cmd_expand.py')
-rw-r--r-- | examples/data/uzbl/plugins/cmd_expand.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/data/uzbl/plugins/cmd_expand.py b/examples/data/uzbl/plugins/cmd_expand.py index a5c279d..3f6ae2b 100644 --- a/examples/data/uzbl/plugins/cmd_expand.py +++ b/examples/data/uzbl/plugins/cmd_expand.py @@ -1,6 +1,3 @@ -__export__ = ['cmd_expand',] - - def escape(str): for (level, char) in [(3, '\\'), (2, "'"), (2, '"'), (1, '@')]: str = str.replace(char, (level * '\\') + char) @@ -39,5 +36,7 @@ def cmd_expand(uzbl, cmd, args): return cmd -def init(*args): - pass +def init(uzbl): + # Function exports to the uzbl object, `function(uzbl, *args, ..)` + # becomes `uzbl.function(*args, ..)`. + uzbl.export('cmd_expand', cmd_expand) |