summary refs log tree commit diff stats
path: root/examples
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2013-02-22 04:46:09 +0100
committerhut <hut@lavabit.com>2013-02-22 04:46:09 +0100
commitbf6a3d6d6c11a85c37322e713b3c7a6eb2a484fc (patch)
tree776b05d2e7ed9ae03a3fb1115b8ae023e5bebbdd /examples
parent4d48d33ca5529464dadbb2fc70888da4cd9d24fa (diff)
parentc1138eb006c6daaa9b88204b0695f18d55e027dc (diff)
downloadranger-bf6a3d6d6c11a85c37322e713b3c7a6eb2a484fc.tar.gz
Merge branch 'master' into vcs
Conflicts:
	ranger/gui/widgets/browsercolumn.py
Diffstat (limited to 'examples')
-rw-r--r--examples/plugin_chmod_keybindings.py2
-rw-r--r--examples/plugin_hello_world.py10
-rw-r--r--examples/plugin_skip_default_rc.py9
3 files changed, 6 insertions, 15 deletions
diff --git a/examples/plugin_chmod_keybindings.py b/examples/plugin_chmod_keybindings.py
index 9c9a0982..f26cb3e3 100644
--- a/examples/plugin_chmod_keybindings.py
+++ b/examples/plugin_chmod_keybindings.py
@@ -10,7 +10,7 @@ def 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 mode in list('ugoa') + ['']:
         for perm in "rwxXst":
             fm.execute_console(command.format('-', mode, perm))
             fm.execute_console(command.format('+', mode, perm))
diff --git a/examples/plugin_hello_world.py b/examples/plugin_hello_world.py
index 187f428e..e43eb61d 100644
--- a/examples/plugin_hello_world.py
+++ b/examples/plugin_hello_world.py
@@ -11,11 +11,11 @@ old_hook_ready = ranger.api.hook_ready
 
 # Create a replacement for the hook that...
 def hook_ready(fm):
-  # ...does the desired action...
-  fm.notify("Hello World")
-  # ...and calls the saved hook.  If you don't care about the return value, simply
-  # return the return value of the previous hook to be on the safe side.
-  return old_hook_ready(fm)
+    # ...does the desired action...
+    fm.notify("Hello World")
+    # ...and calls the saved hook.  If you don't care about the return value,
+    # simply return the return value of the previous hook to be safe.
+    return old_hook_ready(fm)
 
 # Finally, "monkey patch" the existing hook_ready function with our replacement:
 ranger.api.hook_ready = hook_ready
diff --git a/examples/plugin_skip_default_rc.py b/examples/plugin_skip_default_rc.py
deleted file mode 100644
index 6a657a99..00000000
--- a/examples/plugin_skip_default_rc.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# This plugin inhibits the loading of the default rc.conf.  This serves to
-# speed up starting time by avoiding to load rc.conf twice if you have a full
-# copy of it in ~/.config/ranger.
-#
-# Don't use this if you have a supplementary rc.conf or no rc.conf at all, or
-# you will end up without key bindings and options.
-
-import ranger.core.main
-ranger.core.main.load_default_config = False