HACKING.md
2.6+ and 3.1+.pydoc in mindmake test before submitting a new PR. pylint, flake8,
pytest, doctest and shellcheck need to be installed. (If you don't
change any shell scripts you can run make test_py and you don't need the
shellcheck dependency but it's an awesome tool, so check it out : )COMPAT. For
examples, grep the code for the word COMPAT. :)Send patches, created with git format-patch, to the email address
or open a pull request on GitHub.
Please use PGP-encryption for security-relevant patches or messages. PGP key IDs are shared along with releases on https://ranger.fm and can be attempted in reverse chronological order in case a maintainer is unresponsive.
Three numbers, A.B.C, where
A changes on a rewriteB changes when major configuration incompatibilities occurC changes with each releaseGood places to read about ranger internals are:
ranger/core/actions.pyranger/container/fsobject.pyAbout the UI:
ranger/gui/widgets/browsercolumn.pyranger/gui/widgets/view_miller.pyranger/gui/ui.pyrc.conf, along with a comment that describes the option.ALLOWED_SETTINGS dictionary in the file
ranger/container/settings.py in alphabetical order.doc/ranger.pod, then rebuild the man
page by running make man in the ranger root directoryThe setting is now accessible with self.settings.my_option, assuming self is a
subclass of ranger.core.shared.SettingsAware.
Copy ranger/colorschemes/default.py to ranger/colorschemes/myscheme.py
and modify it according to your needs. Alternatively, create a subclass of
ranger.colorschemes.default.Default and override the use method, as it is
done in the Jungle colorscheme.
Add this line to your ~/.config/ranger/rc.conf:
set colorscheme myscheme
Edit the configuration file ~/.config/ranger/rifle.conf. The default one can
be obtained by running ranger --copy-config rifle.
Modify ranger/data/mime.types. You may also add your own entries to ~/.mime.types
In ranger/container/file.py, change the constant PREVIEW_BLACKLIST