diff options
author | hut <hut@lepus.uberspace.de> | 2015-04-14 01:46:12 +0200 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2015-04-14 01:46:12 +0200 |
commit | eb9a75caa91f9315d14b17db14af4dfdd71fa82e (patch) | |
tree | 26e2d4002756a20666c6a2e6f8d148aafc990afe /doc/examples/plugin_chmod_keybindings.py | |
parent | 09b0f2f1044025c8d14d5f7296f43b495cf75ec3 (diff) | |
parent | 89146651e07830f15b59b5f076d61741747a0bea (diff) | |
download | ranger-1.7.0-emacs.tar.gz |
Merge branch 'master' into emacs v1.7.0-emacs
Diffstat (limited to 'doc/examples/plugin_chmod_keybindings.py')
-rw-r--r-- | doc/examples/plugin_chmod_keybindings.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/doc/examples/plugin_chmod_keybindings.py b/doc/examples/plugin_chmod_keybindings.py deleted file mode 100644 index 0ab975ed..00000000 --- a/doc/examples/plugin_chmod_keybindings.py +++ /dev/null @@ -1,20 +0,0 @@ -# Compatible with ranger 1.6.* -# -# This plugin serves as an example for adding key bindings through a plugin. -# It could replace the ten lines in the rc.conf that create the key bindings -# for the "chmod" command. - -import ranger.api -old_hook_init = ranger.api.hook_init - -def hook_init(fm): - old_hook_init(fm) - - # Generate key bindings for the chmod command - command = "map {0}{1}{2} shell -d chmod {1}{0}{2} %s" - for mode in list('ugoa') + ['']: - for perm in "rwxXst": - fm.execute_console(command.format('-', mode, perm)) - fm.execute_console(command.format('+', mode, perm)) - -ranger.api.hook_init = hook_init |