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_file_filter.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_file_filter.py')
-rw-r--r-- | doc/examples/plugin_file_filter.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/doc/examples/plugin_file_filter.py b/doc/examples/plugin_file_filter.py deleted file mode 100644 index b9bea1f3..00000000 --- a/doc/examples/plugin_file_filter.py +++ /dev/null @@ -1,21 +0,0 @@ -# Compatible since ranger 1.6.1, git commit c82a8a76989c -# -# This plugin hides the directories "/boot", "/sbin", "/proc" and "/sys" unless -# the "show_hidden" option is activated. - -# Save the original filter function -import ranger.container.directory -old_accept_file = ranger.container.directory.accept_file - -HIDE_FILES = ("/boot", "/sbin", "/proc", "/sys") - -# Define a new one -def custom_accept_file(file, filters): - if not file.fm.settings.show_hidden and file.path in HIDE_FILES: - return False - else: - return old_accept_file(file, filters) - -# Overwrite the old function -import ranger.container.directory -ranger.container.directory.accept_file = custom_accept_file |