pax_global_header00006660000000000000000000000064147122256120014514gustar00rootroot0000000000000052 comment=55fc2839f693aed9486d211694d7317d78161341 ranger-1.9.4/000077500000000000000000000000001471222561200130055ustar00rootroot00000000000000ranger-1.9.4/.flake8000066400000000000000000000000611471222561200141550ustar00rootroot00000000000000[flake8] max-line-length = 99 ignore = E221,W503 ranger-1.9.4/.github/000077500000000000000000000000001471222561200143455ustar00rootroot00000000000000ranger-1.9.4/.github/ISSUE_TEMPLATE.md000066400000000000000000000017671471222561200170650ustar00rootroot00000000000000 #### Runtime Environment - Operating system and version: - Terminal emulator and version: - Python version: - Ranger version/commit: - Locale: #### Current Behavior #### Expected Behavior #### Context #### Possible Solutions #### Steps to reproduce 1. 2. 3. #### Traceback ``` ``` ranger-1.9.4/.github/PULL_REQUEST_TEMPLATE.md000066400000000000000000000026701471222561200201530ustar00rootroot00000000000000 #### ISSUE TYPE - Bug fix - Improvement/feature implementation - Breaking changes #### RUNTIME ENVIRONMENT - Operating system and version: - Terminal emulator and version: - Python version: - Ranger version/commit: - Locale: #### CHECKLIST - [ ] The `CONTRIBUTING` document has been read **[REQUIRED]** - [ ] All changes follow the code style **[REQUIRED]** - [ ] All new and existing tests pass **[REQUIRED]** - [ ] Changes require config files to be updated - [ ] Config files have been updated - [ ] Changes require documentation to be updated - [ ] Documentation has been updated - [ ] Changes require tests to be updated - [ ] Tests have been updated #### DESCRIPTION #### MOTIVATION AND CONTEXT #### TESTING #### IMAGES / VIDEOS ranger-1.9.4/.github/workflows/000077500000000000000000000000001471222561200164025ustar00rootroot00000000000000ranger-1.9.4/.github/workflows/doctest.yml000066400000000000000000000012501471222561200205700ustar00rootroot00000000000000name: Python doctest and pytest on: push: paths: - '.github/workflows/doctest.yml' - '*.py' jobs: test_py: runs-on: ubuntu-latest strategy: max-parallel: 4 matrix: python-version: [2.7, 3.5, 3.6] steps: - uses: actions/checkout@v1 with: fetch-depth: 1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: doctest run: | make test_doctest test_other ranger-1.9.4/.github/workflows/py37.yml000066400000000000000000000013071471222561200177300ustar00rootroot00000000000000name: Python 3.7 lints and tests on: push: paths: - '.github/workflows/py37.yml' - '*.py' jobs: test_py: runs-on: ubuntu-latest strategy: max-parallel: 4 matrix: python-version: [3.7] steps: - uses: actions/checkout@v1 with: fetch-depth: 1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r <(sed 's/<2//' requirements.txt) - name: Lint and test with pylint, flake8, doctest, pytest run: | make test_py ranger-1.9.4/.github/workflows/python.yml000066400000000000000000000013521471222561200204470ustar00rootroot00000000000000name: Python lints and tests on: push: paths: - '.github/workflows/python.yml' - '*.py' jobs: test_py: runs-on: ubuntu-latest strategy: max-parallel: 4 matrix: python-version: [2.7, 3.5, 3.6] steps: - uses: actions/checkout@v1 with: fetch-depth: 1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: Lint and test with pylint, flake8, -d-o-c-t-e-s-t-, -p-y-t-e-s-t- run: | make test_pylint test_flake8 test_pytest ranger-1.9.4/.github/workflows/shellcheck.yml000066400000000000000000000011171471222561200212320ustar00rootroot00000000000000name: Shellcheck scope.sh on: push: paths: - '.github/workflows/shellcheck.yml' - 'ranger/data/scope.sh' jobs: test_shellcheck: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 with: fetch-depth: 1 - name: Install newer shellcheck (0.7.0 rather than 0.4.6) run: | curl -LO "https://storage.googleapis.com/shellcheck/shellcheck-stable.linux.x86_64.tar.xz" tar xf shellcheck-stable.linux.x86_64.tar.xz - name: Shellcheck scope.sh run: | env PATH=shellcheck-stable:$PATH make test_shellcheck ranger-1.9.4/.gitignore000066400000000000000000000002441471222561200147750ustar00rootroot00000000000000*.pyc *.pyo *~ *.orig /.cache /build /build_scripts /dist /doc/ranger.1.html /install_log.txt /pytestdebug.log /ranger_fm.egg-info /stuff/* .idea .pytest_cache ranger-1.9.4/.pylintrc000066400000000000000000000005361471222561200146560ustar00rootroot00000000000000[BASIC] good-names=i,j,k,n,x,y,ex,Run,_,fm,ui,fg,bg bad-names=foo,baz,toto,tutu,tata [DESIGN] max-args=6 max-branches=16 [FORMAT] max-line-length = 99 disable=locally-disabled,locally-enabled,missing-docstring,duplicate-code,fixme,cyclic-import,redefined-variable-type,stop-iteration-return [TYPECHECK] ignored-classes=ranger.core.actions.Actions ranger-1.9.4/.travis.yml000066400000000000000000000002221471222561200151120ustar00rootroot00000000000000dist: 'xenial' language: 'python' python: - '2.7' - '3.5' - '3.6' install: - 'pip install -r requirements.txt' script: - 'make test' ranger-1.9.4/AUTHORS000066400000000000000000000030051471222561200140530ustar00rootroot00000000000000Copyright 2009-2018 Roman Zimbelmann Copyright 2010 David Barnett Copyright 2010 Lucas de Vries Copyright 2010 Sitaram Chamarty Copyright 2011 David Pugnasse Copyright 2011 ornicar Copyright 2011-2012 Abdó Roig-Maranges Copyright 2011-2012 M Rawash Copyright 2012 Serge Broslavsky Copyright 2012 joe Copyright 2013 Emanuel Guevel Copyright 2013 Joseph Tannhuber Copyright 2013-2014 GermainZ Copyright 2014 Célestin Matte Copyright 2014 Milan Svoboda Copyright 2014 rukai Copyright 2015 Alexander Buddenbrock Copyright 2015 Delisa Mason Copyright 2015 No Suck Copyright 2015 Randy Nance Copyright 2015 Ryan Burns Copyright 2015 anekos Copyright 2015 bastorran Copyright 2015-2017 nfnty Copyright 2015-2018 Wojciech Siewierski Copyright 2016-2018 Toon Nolten Ideally, all contributors of non-trivial code are named here to the extent that a name and email address is available. Please send an email to hut@hut.pm if your name is missing, or in case of any other issues. ranger-1.9.4/CHANGELOG.md000066400000000000000000000565341471222561200146330ustar00rootroot00000000000000This log documents changes between stable versions. # 2024-11-04: version 1.9.4 * Fixed import error of deprecated imghdr python library # 2019-12-31: version 1.9.3 * Added Comic cbz/cbr previews * Added DjVu previews * Added Font previews * Added Wayland support to rifle * Added `imv` to rifle * Added `paste_ext` command with new name collision behavior * Added a `size_in_bytes` setting * Added a new `%any_path` macro to simplify use of bookmarks in commands * Added a new image previewing method using `ueberzug` * Added archive previews * Added filters for uniqueness and duplicates by hash to `filter_stack` * Added generic openers to rifle, `xdg-open` for example * Added line modes with human readable size information * Added loading of plugins from local configuration directory * Added previews for 3d models using `openscad` * Added previews of MS Office documents * Added scrolling in preview * Added trash functionality to ranger, as alternative to deleting files * Added zathura to rifle * Changed `c/p/tunmap` to `unc/p/tmap` respectively, fixing them in the process * Changed argument order for `tag_toggle` * Fixed `chmod` behavior with `000` quantifier * Fixed a crash involving `Ctrl+space` * Fixed behavior of statusbar when resizing terminal window * Fixed busyloop when ranger's STDIN was closed * Fixed drawing of borders in st * Fixed handling of macros for `chain` * Fixed unicode decoding errors for previews * Improved VCS integration by truncating long commit messages * Improved `bulkrename` behavior when moving files to a non-existing directory * Improved `bulkrename`'s handling of files with utf-16 surrogates in the name * Improved behavior of `rename_append` for directories * Improved configurability of syntax highlighting previews * Improved coverage of unofficial MIME types, mostly audio formats * Improved documentation of `multipane` viewmode * Improved documentation of optional dependencies * Improved documentation on `copymap` * Improved documentation on `tab_shift` * Improved documentation on `w3m_offset` * Improved example shell scripts * Improved extensibility of image previewing methods using a registry * Improved fuzzy tab completion * Improved guessing of file encoding * Improved handling of configuration and cache directories when using `--clean` * Improved handling of invalid mtimes (Relevant for fuse mounts) * Improved logging of file deletion * Improved testing and CI setup * Improved updating of tmux/screen window names * Improved updating of window titles * Improved validation of bookmarks * Improved w3m preview method for terminals that aren't quite compatible # 2018-09-09: version 1.9.2 * Added a `hint_collapse_threshold` setting * Added a `traverse_backwards` command analogous to `traverse` * Added a command to shift tabs * Added a normal mode mapping to quickly enter the console and scroll through the history `C-p` * Added a section to `scope.sh` for image previews of archives * Added an avfs plugin * Added an option to the move command to enable launching the selected file instead of the marked files * Added filtering functionality inspired by dired's filter stack, `.n, .| ...` * Added image preview method for Kitty * Added option to disable the display of free space for high latency situations * Added section to `scope.sh` for pdf previews with mutool * Added several emacs/readline-inspired keybindings, `C-g` for `ESC`, `alt-f/b` * Added systemwide `rc.conf` and `commands.py` in `/etc/ranger` * Added the `%any_path` macro to allow bookmarks to be used with commands that need a path and are unaware of bookmarks * Added versioning logic to include extra info in unreleased versions * Change tab saving to save all tabs, not just the active tab * Changed `draw_borders` setting to enable drawing only borders or seperators * Changed behavior of positional arguments to the ranger command, if you specify a path to a file ranger will open with that file selected * Changed the `tilde_in_titlebar` setting to influence the window titlebar too * Changed the default colorscheme to work properly in terminals that don't equate bold and bright * Fixed StopIteration errors * Fixed embedded null errors * Fixed issues reported by coverity scan * Fixed running ranger as root on Mac OS * Fixed unicode issue for python2 * Fixed w3m preview issues with black stripes * Improved PEP8 adherence * Improved VCS symbols * Improved `--cmd` functionality * Improved file encoding detection by using chardet if it's available * Rifle's flag t should now work with more terminals than xterm and urxvt * Update colorscheme documentation # 2018-02-22: version 1.9.1 * Fixed the rifle config backwards compatibility (regression in 1.9.0) * Fixed the POSIX compatibility of `Makefile` * Fixed `--choosefile`, `--choosefiles` and `--choosedir` so they work with the process substitution (`>(...)` in Bash) * Changed the default `gt` binding to `gp` due to a conflict * Changed the help message for `--choosefile`, `--choosefiles` and `--choosedir` to avoid confusion * Changed the behavior of `:reset` to reload the tags too * Added `geeqie` to the default `rifle.conf` # 2018-01-25: version 1.9.0 * Fixed memory leak in w3m image preview * Fixed `Q` binding, map it to `quitall` instead of `quit!` * Fixed `gR` binding * Fixed custom linemode not being applied to files * Fixed w3m image display invocation on OpenBSD * Fixed broken pager after changing view mode with `~` * Added reset of rifle.conf when pressing `` * Added image-based PDF previews to `scope.sh` (disabled by default) * Added terminology-based image previews * Added check for `$VISUAL` environment variable * Added setting `iterm2_font_height` and `iterm2_font_width` * Renamed setting `cd_tab_smart` to `cd_tab_fuzzy` * Changed command for mercurial integration from `hg` to `chg` # 2017-11-19: version 1.9.0b6 * Fixed crash when parsing corrupted history file * Fixed tab completion with `cd -r ...` * Fixed crash when previewing files encoded in little-endian UTF-16 * Fixed flicker in previewing symlinked images * Fixed detection of location of scope.sh * Fixed crash when running ranger from the directory containing its package * Fixed cursor position after moving half a page down and back up * Fixed handling of lines that are too long for the console * Added `` binding to `:rename_append` * Avoid dereferencing symlinked directory when starting ranger in one * Added support for `file://` URIs as path arguments * Added setting `save_tabs_on_exit` * Added setting `cd_tab_case`, sets case sensitivity of `:cd` tab completion * Added setting `cd_tab_smart`, allows fuzzy tab completion with `:cd`, for example, `:cd /u/lo/b` expands to `:cd /usr/local/bin` * Added setting `global_inode_type_filter` to show only directories when running ranger with the new option `--show-only-dirs` * Added setting `save_backtick_bookmark`, e.g. for easier syncing of bookmarks * Added setting `one_indexed` to start counting line numbers from 1 * Added rifle.conf entries to list/extract archives without atool * Added `:yank` command for simplified definitions of `yn`, `yd` & `yp` * Added `:narrow` command, which filters selected files * Added setting `freeze_files`, bound to `F` key, to avoid reloading files * Changed `:shell -p ...` to display stderr in pager # 2017-02-19: version 1.9.0b5 * Fixed width calculation of multibyte characters in preview * Fixed crash in iTerm2 preview with python 3.5 # 2017-02-10: version 1.9.0b1 * Fixed crash when using `Mi` on files without reading permissions * Fixed natural sorting (`11.jpg` < `100.jpg`) * Fixed loss of precision in timestamps when copying * Fixed smart case matching in `:travel` * Fixed automatically disabling `preview_script` when running as root * Fixed crash on sshfs disconnect * Fixed crash on missing `~/.config/ranger/history` * Fixed crash when path not accessible during start-up * Fixed automatic tmux title * Fixed urxvt image previewing when running tmux * Fixed macro expansion in aliased commands * Fixed `hidden_filter` option when combined with `:flat` * Fixed various other crashes * Fixed error message that occasionally pops up when changing settings * Introduced extensive linting to ensure code quality * Added continuous integration. Patches now require `make test` to pass. * Added handling of arguments in "$PAGER" environment variable * Added quote parsing for `:setlocal path=...` * Added `ys` to copy the selection to clipboard * Added setting `hostname_in_titlebar` * Added setting `wrap_scroll` to wrap cursor around when scrolling * Added example plugin `plugin_fasd_add.py` * Added command `jump_non` to jump to the first non-directory file * Added additional arguments to the command `:rename_append` * Added key binding 'zz' as an alternative to 'zf' * Added option `-c` to the `rifle` file opener command * Added support for `$XDG_DATA_HOME` * Avoid exiting ranger while copying. Use `:quit!` to quit while copying. * Improved scope.sh (better performance & readability) * Improved logs handling by migrating to the python standard logging library (PR #725) * Changed `ranger --choosefiles` to return all selected files in all paths * Changed interpretation of commands: treat tabs as argument separators * Changed `` to open new tab in current directory rather than `$HOME` * Changed `:quit!` to only close 1 tab. Use `:quitall` to close all tabs. * Removed backward compatibility for `options.py`, predecessor of `rc.conf` * Automatically update bookmarks+tags when renaming them via ranger # 2017-01-08: version 1.8.1 * Fixed `:scout` break due to incompatible change in python 3.6 # 2016-12-24: version 1.8.0 * scope.sh is now needed for the now fully scriptable image previews * Overhaul of version control system integration, now with threads * Fixed ranger not finding the location of w3mimgdisplay in most cases * Fixed many minor bugs * Added midnight-commander like multipane view, toggleable with `~` key. It displays the current directory of all the open tabs next to each other. * Added autodetect for 256 color support in scope.sh source code preview * Added macro `%confdir` that expands to `~/.config/ranger` by default * Added possibility to toggle/cycle through options with `set !` * Added `Mm`/`Ms` key to enable the linemode showing modification time * Added `yt`/`dt` keys to toggle whether file is in copy/cut buffer * Added `line_numbers` setting showing absolute/relative line numbers * Added `Alt-Left` and `Alt-Right` key bindings to move by words in console * Added previews for libreoffice files with `odt2txt` * Added `preview_images_method=urxvt` option for previewing images by changing the urxvt background (requires urxvt compiled with pixbuf support) * Added `clear_filters_on_dir_change` option * Added Travis-CI integration * Changed `zi` key to toggle `preview_images` option * Improved PEP8 compliance * Improved documentation * Improved UI by separating file path in titlebar with a space from the username/hostname for quick copy&pasting by shift+double-clicking on it. # 2015-10-04: version 1.7.2 * Fixed file name arguments passed to `sxiv` and `feh` when using `:flat` * Fixed removal of empty directories when using `:rename` * Fixed free disk space display on Mac OS X * Fixed `examples/vim_file_chooser` to work with gvim too * Fixed some other rare crashes and bugs * Fixed downward mouse wheel scrolling * Fixed warning about regex splits being drawn in titlebar since python3.5 * Really fixed `S` key binding not working when SHELL=fish * Improved `doc/cheatsheet.svg` * Added some entries to rifle.conf * Added key bindings `pO` and `pP` which work like `po` and `pp` but queue the operation in a first-in-first-out order. # 2015-05-04: version 1.7.1 * Added `doc/cheatsheet.svg` * Added `examples/rc_emacs.conf`, a config file adding emacs-like key bindings * Added `env` keyword in rifle.conf * Fixed `:bulkrename` command in python3 * Fixed `S` key binding not working when SHELL=fish # 2015-04-13: version 1.7.0 * The default editor is now `vim` instead of `nano` * Added automatic updates of tags when a file is renamed from within ranger * Added `preview_images_method` which can be set to `iterm2` to use native iTerm2 image previews * Added `:rename_append` command to rename files without the file extension * Added `:linemode` command to change the way the files are displayed Try this out by pressing M followed by one of the suggested keys. New linemodes can be added with `ranger.api.register_linemode()`. * Added `:filter_inode_type` command to only show directories, files or links * Added `:meta` command for managing custom file metadata * Added `:flat` command for displaying subdirectories * Added `solarized` colorscheme * Added generic ability to use scope.sh for image previews * Added video previews in scope.sh * Added option `sort_unicode` to sort according to unicode, not ASCII * `:mkdir` can now create multiple directory levels (like `mkdir -p`) * `:help` (key binding `?`) is now interactive * `:find` (key binding `/`) is now case insensitive by default * `ranger --copy-config=all` now copies a short sample commands.py rather than the full one, so that you can update ranger without having broken commands. The full commands.py is still copied to `~/.config/ranger/commands_full.py`. * Fixed broken copying of symlinks # 2013-05-24: Version 1.6.1 * Added support for version control systems, see: http://lists.nongnu.org/archive/html/ranger-users/2013-03/msg00007.html * Added :scout command as a unified backend to :find, :search, etc * Added `open_all_images` setting to remove the need for external scripts to handle opening of all images in a directory at once. * Now previewing with `i` uses the whole available width. # 2013-02-22: Version 1.6.0 * Overhauled all config files. Please update them or use the --clean switch * Added `examples/` directory to source code which contains sample programs or plugins that can be used together with ranger * Added progress bars to copying, moving and directory loading processes * Added feature to draw images inside the console using w3mimgdisplay (you need to add `set preview_images true` in rc.conf) * Added a plugin system like in the program `anki`, i.e. place any python file into ~/.config/ranger/plugins/ and it will be imported by ranger * Added a separate file launcher named `rifle` that is configured through rifle.conf and is installed as a standalone program. Using `ranger [filename]` from the shell for opening files is deprecated now, please use `rifle [filename]` instead. * Added `uq` keybinding to undo closed tabs * Added :setlocal command to change settings for specific directories only * Added :travel command to move more quickly to your destination * Added 256 color support for scope.sh * Added a real yes/no prompt for :delete command * Added settings: `confirm_on_delete`, `draw_progress_bar_in_status_bar`, `preview_images`, `status_bar_on_top`, `update_tmux_title` * Added commands: `:mark_tag`, `:unmark_tag` * Added BSD-friendly setsid implementation * Added as-you-type filtering for `:filter` command * Replaced `options.py` file by :set commands in rc.conf * Replaced `apps.py` file with rifle.conf * Improved `r` key to interface with rifle * Rewritten `scope.sh` in POSIX shell * Changed copying/moving code to work without GNU coreutils * Changed key to untag files from `T` to `ut` * Changed the flag `d` (for detached) to `f` (for fork) in program launcher * Changed appearance of keybinding-hints and bookmarks * Changed tabs with 4 spaces in the source code (see PEP 8) * Removed ranger.core.environment class * Removed settings: `colorscheme_overlay`, `draw_bookmark_borders`, `init_function`, `load_default_rc` * Fixed zombie process apocalypse * Fixed `draw_borders=true` in combination with `padding_right=false` # 2012-08-10: Version 1.5.5 * Ensure that detached programs continue to run when ranger is killed # 2012-05-03: Version 1.5.4 * Added exiftool to scope.sh by default * Fixed a crash when entering a directory with a unicode name * Speedup in `ranger.ext.get_executables` # 2012-03-05: Version 1.5.3 * Added --selectfile option that selects a certain file on startup * Added --list-tagged-files option * Added --cmd option to run commands on startup * Added --profile option for additional debug information on exit * Added a visual mode (activate with `V`, deactivate with Esc) * Added a reversed visual mode (activate with `uV`) * Added `$RANGER_LEVEL` environment variable which ranger sets to `1` or higher so programs can know that they were spawned from ranger * Added run flag `r` for running with root privileges (needs sudo) * Added run flag `t` for running in a new terminal (as specified in $TERMCMD) * Added :relink command to change destinations of symlinks * Added `dc` binding for getting the cumulative size of a directory * Added `autoupdate_cumulative_size` option * Added `pht` binding to Paste Hardlinked subTrees (like cp -l) * Improved sorting speed of signals (noticeable when caching many directories) * Improved drawing speed * Fixed unexpected behavior when displaying nonprintable characters * Fixed :bulkrename to work with files starting with a minus sign * Fixed RangerChooser example in man page * Fixed crash when opening images with sxiv/feh by running `ranger ` # 2011-10-23: Version 1.5.2 * Fixed graphical bug that appears in certain cases when drawing characters at the right edge. # 2011-10-23: Version 1.5.1 * Added `fm.select_file(path)` * Added --choosefiles option (like --choosefile, but chooses multiple files) * Fixed --list-unused-keys * Fixed Zombie processes * Fixed handling of filenames with undecodable bytes (unicode surrogates) * Fixed crashes due to incomplete loading of directories * Fixed tab completion of the command `shell` * Fixed `ot` and `oT` keys in rc.conf * Fixed parsing of chained commands (like in the binding `om`) # 2011-10-11: Version 1.5.0 * Full python3.2 compatibility * Added new configuration file `rc.conf` which contains a list of commands that are executed on startup - mainly used for keybindings * Added --list-unused-keys * Added new program handlers to apps.py * Added pop-up window for keychains and bookmarks * Added `load_default_rc` option * Fixed all known unicode issues * Fixed crash when $TERM is unknown to the system * Fixed scrolling in colored preview * Changed the default `column_ratios` to 1/3/4 and sorting method to `natural` * Changed :rename so it doesn't overwrite existing files * Internal actions are now accessible as commands * Replaced unittests by doctests * Replaced integrated help with an extended man page and dynamic lists of keybindings, commands and settings. * Removed `keys.py` configuration file in favor of `rc.conf` * Removed `texas` colorscheme * apps.py: Now able to define programs that only run with Xorg * commands.py: Using parse(self.line) to parse the line is unnecessary now. parse(self.line).rest(n) is now written as self.rest(n). However, parse(self.line).chunk(n) has been renamed to self.arg(n). * commands.py: parse(self.line) + X is now self.firstpart + X * commands.py: New special attribute `resolve_macros` which decides whether strings like %f should be expanded to the name of the current file, etc. * commands.py: New special attribute `escape_macros_for_shell` to toggle whether or not macros should be escaped, so you can use them in other commands than :shell, for example :edit %f * Countless small fixes and improvements # 2011-10-02: Version 1.4.4 * Added keys for chmod (like +ow for `chmod o+w`, etc) * Added `c` flag for running files * Added various key bindings * Added wavpack and webm types to mime.types * Added option `display_tags_in_all_columns` * Added command.cancel method which is called when pressing ESC in console * Added sorting and cycling by ctime and atime * Added custom tags (press "x) * Added bittorrent preview * Fixed blocking when using interactive scripts in scope.sh * Fixed issues with ALT key * Fixed pager crash when trying to read non-readable file * Forbid piping things into ranger * Improved hints # 2011-04-05: Version 1.4.3 * Fixed mimetype checking when invoking ranger with a filename * Fixed loss of bookmarks when disk is full * Minor improvements # 2011-03-05: Version 1.4.2 * Added --choosefile and --choosedir flag * Added use of bookmarks in tab completion of the :cd command * Fixed bug with detached programs and python 3.2 # 2011-01-04: Version 1.4.1 * Fixed crash when preview failed under some circumstances * Fixed graphical bug when pressing i # 2010-12-22: Version 1.4.0 * Added option to use any external scripts for previews (see scope.sh) * Added key: zv to toggle the use of the external script * Added indicator for the used filter (type `zf`) * Added option `padding_right` to remove whitespace if theres no preview * Added command `:search_inc` for incremental search * Added commands `:save_copy_buffer` and `:load_copy_buffer` to share the copied files between ranger instances * Added mimeopen as a fallback if no useful application can be found * Added natural sort, sorts 1foo before 10foo. (type `on`) * Added keys: yp, yd and yb to copy path, dirname or basename to seleciton * Let `open_with` use the selection, not just one file * Run files with right mouse click * Implemented copying via coreutils rather than internal python code * Improved handling of unicode * Some restructuration of the source code # 2010-12-13: Version 1.2.3 * Enable binding to alt-keys * Fixed memory leak in garbage collecting of old, unused directory objects * Fixed python3 incompatibilities * Fixed problems with identifying changes of files * Fixed lazy lookup of some FSObject attributes # 2010-10-10: Version 1.2.2 * Prevent currently used directories from being garbage collected * Disable mouse buttons when console is open * Fixed :cd command: Without arguments, cd's into $HOME * Fixed bug which prevented pydoc to work on some config files * Fixed some bugs in `snow` and `jungle` colorschemes * Several other clean-ups and fixes # 2010-09-16: Version 1.2.1 * Fixed yy/pp bug when yanking multiple directories # 2010-09-13: Version 1.2.0 * !!! Changed the default configuration directory to ~/.config/ranger !!! * Removed `Console Modes`, each old mode is now a simple command * Disabled file previews by default if ranger is used by root * Allow to jump to specific help sections by typing two numbers, e.g. 13? * Added keys: da, dr, ya, yr for adding and removing files from copy buffer * Added keys: gl and gL to resolve links, see 11? * Added key: pL to create a relative symlink * Added % and % macros for the console, see 33? * Fixed ansi codes for colors in the pager * Use the file ~/.mime.types for mime type detection * Several clean-ups and fixes # 2010-07-17: Version 1.1.2 * Fix crash when using scrollwheel to scroll down in some cases * The command `ranger dir1 dir2 ...` opens multiple directories in tabs * Removed pydoc html documentation by default, re-create it with `make doc` * Minor fixes # 2010-06-18: Version 1.1.1 * New install script, `setup.py` * New flag for running programs: `w` (waits for enter press) * Minor fixes # 2010-06-09: Version 1.1.0 * Added a man page * Tab support * Improved directory loading performance * Commands are definable in ~/.ranger/commands.py * Case insensitive sorting (type zs) * Better UTF support * Possibility to turn off previews (zp and zP) * Changing options with :set (e.g. `:set column_ratios=1,2,3,4`) * Ask for confirmation when using :delete * New invocation flag: --fail-unless-cd * New hotkeys, commands, options. * New syntax for ~/.ranger/keys.py * Several user contributions * And tons of general improvements ranger-1.9.4/CONTRIBUTING.md000066400000000000000000000013661471222561200152440ustar00rootroot00000000000000# Contributing to Ranger ## Tips for bug reports * Was this issue already reported? Please do a quick search. * Maybe the problem is solved in the current master branch already? Simply clone ranger with `git clone https://github.com/ranger/ranger` or download the git version via https://github.com/ranger/ranger/archive/master.zip and run `./ranger.py` directly to find out. * You can obtain much better error messages with `ranger --debug`, please post those in bug reports rather than the usual, single-line error message. Also check the log by using the default map `W` or by running the command `display_log`. * Send security-relevant bugs PGP-encrypted to hut@hut.pm, see `HACKING.md`. ## Tips on patching * See `HACKING.md` Thank you! ranger-1.9.4/Dockerfile000066400000000000000000000002741471222561200150020ustar00rootroot00000000000000# Usage instructions: # 1. "docker build -t ranger/ranger:latest ." # 2. "docker run -it ranger/ranger" FROM debian RUN apt-get update && apt-get install -y ranger ENTRYPOINT ["ranger"] ranger-1.9.4/HACKING.md000066400000000000000000000205341471222561200143770ustar00rootroot00000000000000Guidelines for Code Modification ================================ Coding Style ------------ * Use syntax compatible with Python `2.6+` and `3.1+`. * Use docstrings with `pydoc` in mind * Follow the PEP8 style guide: https://www.python.org/dev/peps/pep-0008/ * Always run `make 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 : ) * When breaking backward compatibility with old configuration files or plugins, please include a temporary workaround code that provides a compatibility layer and mark it with a comment that includes the word `COMPAT`. For examples, grep the code for the word `COMPAT`. :) Patches ------- Send patches, created with `git format-patch`, to the email address hut@hut.pm or open a pull request on GitHub. Please use PGP-encryption for security-relevant patches or messages. The UIDs of my key are `huterich ` and `hut `, my fingerprint is `1E9B 36EC 051F F6F7 FFC9 69A7 F08C E1E2 00FB 5CDF` and my full pubkey is at the very bottom of this file. Version Numbering ----------------- Three numbers, `A.B.C`, where * `A` changes on a rewrite * `B` changes when major configuration incompatibilities occur * `C` changes with each release Starting Points --------------- Good places to read about ranger internals are: * `ranger/core/actions.py` * `ranger/container/fsobject.py` About the UI: * `ranger/gui/widgets/browsercolumn.py` * `ranger/gui/widgets/view_miller.py` * `ranger/gui/ui.py` Common Changes ============== Adding options -------------- * Add a default value in `rc.conf`, along with a comment that describes the option. * Add the option to the `ALLOWED_SETTINGS` dictionary in the file `ranger/container/settings.py` in alphabetical order. * Add an entry in the man page by editing `doc/ranger.pod`, then rebuild the man page by running `make man` in the ranger root directory The setting is now accessible with `self.settings.my_option`, assuming self is a subclass of `ranger.core.shared.SettingsAware`. Adding colorschemes ------------------- * 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` Change which programs start which file types -------------------------------------------- Edit the configuration file `~/.config/ranger/rifle.conf`. The default one can be obtained by running `ranger --copy-config rifle`. Change which file extensions have which mime type ------------------------------------------------- Modify `ranger/data/mime.types`. You may also add your own entries to `~/.mime.types` Change which files are previewed in the auto preview ---------------------------------------------------- In `ranger/container/file.py`, change the constant `PREVIEW_BLACKLIST` PGP key ======= You may wish to send the author (`hut@hut.pm`) PGP-encrypted mails for security-relevant messages. This is the authors key. Save everything from the `BEGIN PGP PUBLIC KEY BLOCK` up until the `END PGP PUBLIC KEY BLOCK` message into a file and import it with `gpg --import `. ``` -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v2 mQINBEyOeTcBEACwCWkaA9XTE+DtjaCj2mm1EXslelop0JQco+j/KC5haPsYJ0G3 6lH/UpoXNfYw6B84QxILjodK/uKMk5+1RFS2YX/HoypMOobQLV9LHqo4TvRNmwWA u8K446nSE9CDx5yvWYkvj1HucV1GrKqNeDOPcbThRVOPasnwZwf5nmLaYWjn780t nhiWP8OR75/EceyJM2cryASrqgfWRKZoLLioRd67qUxi8zVG9nZIwxIx2OgWvW30 VMsiMvHR6faSOFxBXecag/muu9y5kdYxYxK2YpWhNpxZq8H+dqx2l/0z45nom56A c1aeL3/QoBpBm7GIaeRgcFEHhKAZI3oOQhLmQ8pbJ9WabhdyA7xbsdNrzMGLQGkY qYMk3iwP129ciG9FyZlwqhW3WaQST7hGmC3QKfo+kGLiJZMox3QWKD/lPtmBt1Ax VtDzOq3rbI8ab4OGa7wWJWKOgP+XaCHwy5yIVaCXMuotBqfFR4HJDL8WzfosJ0Du /zjNDyGVER8iF5+Kq5tahtYmmK0T30HMPPvc1qMsZsFsCgVbmQqxr6PgcAvnlvTN UWqGwd3G0BeBGiJrxlWHOsUz94eWCM/DILE2F0Io5SQXpK8FQ0BjeaWGv+NkgYZ+ WJ1wwcATgyGXD3GwABIwSZ8T/w55LRPP5R9sYd1SdlMHFeZ3SJ2Y8ZyC4QARAQAB tBBodXQgPGh1dEBodXQucG0+iQI6BBMBCAAkAhsDBQsJCAcCBhUICQoLAgQWAgMB Ah4BAheABQJWKKDPAhkBAAoJEPCM4eIA+1zfroMP/1NsAAlReX2WXf1voxKj83mi Deae94dd76uVuc7YqQR0aB1WBb8yw8oXPzzCkHG7QKF9FjRWuiA1Y1z3KQmcnsXS F6FVNistVA8Pq52DIR1TyULeN68/4m6C45CflnCMwWIP0rgQgWv0Bg7MhHtNbKTq kbpNfXUc2OZRzjLN03Oe7+hMgn/EmPBBUARYQ4AlearCse1Sy6XA5Sl0T3R9XtlJ /hstyNsOoBd2Q1lfeckP4NuHtEXsCF1eCTS/TGwKmls//RzKB3q3929TDazujKzK eRpT+ZYbW5xBUrUkHdFswuzur3b7YzNjOWKM5Z4wjLJWtk+6fEKSbT6ZDIyX8UkX WVcbO3PittJJFwqLkmbAvg9w4j3drqdP/sguJIjCjw1bHK/OgJ4SXhQITyBBs4R0 EUQLlIGi7eFywLPiQF9u0A6ufsPEto/5lPj0wZvpbtzbtTv/8yMrW9YfWhZ5aghw CvTZlsLp3K97CS2Dpid+7PKrUO4/JqLwKpPHaocXBLGwPfqMOKoNCq4Z58ftk2BN 7Ku+aRN1L9rLK6mTaE388ng1pigArqDFtyOOtzCb4NKKtBleSNVTLYe87HyjRMbw v8llkvssrpqprEmii50B0PWZQzfNFXBrg1jJ5LSz/v+mzt3yNn9ddurqd2rftvSo z+VtvqISACgpnIwZb2UatBpodXRlcmljaCA8aHV0QGxhdmFiaXQuY29tPokCOAQT AQIAIgUCTI55NwIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQ8Izh4gD7 XN+VehAAkntarXp6vJ7oTVhfCmBgl9WsNEKtvt8JfGVqXrd/mkVblEENKPTqXcC+ TeO/n+hcXN7r0ZJEgGsHPBoz9uoShqpxCUYBCXKKf77ffMqemu3W2jNcCDN4+T4q WSGC+NHcjmutjg78bM7CsznRGV6mDl9civrDNxMx2iELEoBImhdMCl8b/a8mOHcH umzWps4xR0Bd0LNnnVzWk5TGLKxrRSa+Ee+MdhnZLFF5mth1Sgcrs4v+2mWMJD88 oWcS9sjK48Wo3dvNiRVh6VkBGn60LcYT7ggo7T6mdF1ZdmDY6mQO/yJuwXICsO3r dOq58S3NrXrnvw7SLMmh5Wqu7xEjhVMgNmlI7yEmwd79wqW6qEDEP2Z8oe3t6CoS XvnF4LzJ5ibX1WDcES0V05eSMKk8rK9JS4h3ytpWvOOs+SI7OnggiIU4ed+jUKgx rtbxXkCc+CJaH5Ne3lmEJsifHGuRIqKld6nQK3bMNaNh2vFbvLOpH6BYKefDQblX IieKNpVVAfdzeSq3d3EXvG21v78Cfh4FM6nc6kIVYA1CRTyNElhgh6FwdcV1RUlr IQ4Zq+GJVnpDKucuWzAX980UjZlEZrZxGT+270Dqu2HpBPPhJsSoirvHGmMHTWnt /oUsIEC7ba0yh+y0jFR3fJYn6NjML9O0SGrMC8cBSVTa1tCG+VWJARwEEAECAAYF AlIwNVEACgkQ0/BQFp1SsougYwgAlYUKtlvw0/PlOOkzx7yfDdkmAMKpxCue1Wnt hDCKTY49zT+iBqxVXbmELHqPGxwE8p/ACFqGP+vFAT1JvdftmQeehf98wi7kwtHm ClBJPvIBY3Na6yZqYl3Q39cGzsrlldoMAPL/R28i+eY3KkivaHp6Y2LzzIIEUnKR OCDpWpNjdIWT7q6pe14gSLeFiegpnZEGD1sQmniHbuwChc3ud17ojI2sFN/tbL6M D3O1CfvEbC5XpgKirbsKY2UOiONq8YbwV62eAAx/HJWGLPrAZJH9wB4VP09+wOND YiQ2pCotpEzjE2AMOD5NlPRizo/TwsgRZIVNPvYG3RaTbbMyBokCHAQQAQIABgUC UsVNhAAKCRA1UveuA2o4tQW4D/9QG+gVxUroxr3Lx8T0xt+4eBM8skCDRfTj/tRg /h2D/y1xXp84pik9zKuDYbvB+02IUF2CTm5oJirrX7Mdgti0GGIS2LN8a2aVSac3 Wqfv8P81v+edMxbOO7aYPD2eenbVCd3wNg18c2GrsTyw9FzcJHDfqc0lp16wnbUt j4ZUMzY1KrN1TEC+Z0fHAmanUsj/i1eSIiGaJxzsSHRpUltv8OoiT2WeKIzlIVoA bd92d6uLR9NTdXw2fdORJFvQQWEKbd26oZK7gLRtrYVm1VfwCN6lcVGEu9nSeg2W o53C48TpfzE3XrEnSbAicsWV2z9QQv187sTbY6VJbXPpSlIhJU0aLh9bbsSyvmTs QDtw4D28HdNrc1XClQgF7mjYC6VTlCUK9lTcmrACzfUillv+XD0Pr6VhtpcN78ie 1LxOG2BBLdu2Ww9GeR6pR6WAyUg28h5nqkBwvlkiufMbTJ80IaF5DmyYbUlFT21j Ben6CvqstMngbcQ74DwUaO4iIvsMJ7WPWgaiVdH113a4Scl+WIbcE95q+Xcrg2n+ FidCeccD88bXH+c1Zu292NSQ+Kn0XvGbfY+1vFxJ6A+Gx03bTR4uOhKGWMS9IrSd pxHedrDGn/DJfZKifgVhyzrFEvPvxifIJidbVr7wwUQGANtVdsHs1vVF/ZrCRGtH ot8dSLkCDQRMjnk3ARAAqwzAE/LKceQXCctfwtNEBjcv/5ZFWmSWDx2wCuhAg1/p veTWBHU4ClpGSvfOLYRfpy8KwgPFK9sOS3lTDCDEDJOi1DvThhkbby8hqVqc6/r3 q4YvQDaNtb+i3IxX3b66eXX36HzWBbMhHvZjywOE1SAbv4YLdOGh9Pf5wxnssFnR eRkQ2UdmxUgD2TJKiyOQGkl1QCbvlIta0iz3ku92tqTXtM8iLG60KZX+mi/ckEOR kh4reAGUCW3PvRCRXHnwnEuULkE5Q5haOtfqFJxEBgAV2CLUzsLU8/ATiHpjXQpN 8ybkVB5AlFZnLqc4VOxn7Wz+aP23X9yhSlaRkGZKrzs2gv/JJTg9zV/qPc/5L8LV qiEDs0wFybDfmkUrYbNW3CtTTDA9vqqM/ifjxXcZbOBzXbXevJdYWy9CgWhhS+vS W/uVE55yStQ2fdDJIqa9A4bqmEh6/w1Aloa3I1JPAikjbAv74n8zdnbCqa/+36Uo YV0yHFHJPVzWAXbXR83LkVc9R1s5rlhXnuP51AZWI/KFOBWeBQ0/mXF9X1A3ayPD yq5j8InU9ZbQ3IA9UgjhItRHZXY9waCOdAT/m79Ka+3YLTZyyc7NUWhu54dyixWJ FE1xZ/hIAgvFxCYDeln29a+sSGmcd7jsx/9m61gWfnkkR2yIyfoJxdrlKR29LvEA EQEAAYkCHwQYAQIACQUCTI55NwIbDAAKCRDwjOHiAPtc3yz1EACW4wzhsdvtQ7Xi Zb8XHlSGyY8oMUCVxoUIw4qGO1KpzC8lnCyqinKi9KiNoBKlwHeOzpzwWD4K8uSl WRmw2YyG0RTfSauzsKKA7DzhL2RD0BsG6R86U3cl7smPGqkxW/CDGYHbozAz2sB6 4f4HQ+PtEsefiBe+Fkb4t0QhID8jDzTriEsENi5ITD8LSH3qVyJuRllD6JxIS6Nz 7kFuo3+Ng3N6SPB6vR+Az/XlHwAoUAmE+AF/aukbwHlOmWnrpik0hCPzkdpOjhwc +8URaQ5oCXjQv0C04Lzukn9SuSHI26btvtDbiGW0GCANV2/lIkJciZ21V+E9wHa7 +kUSLJO6XXa00EOSP5xStXEQ5bSroA1n6NllO19EigrvNXH34pyxPezL8UcWNyM4 8k3W7hv9uR0Axa7eupYYg/17zgRbV0gZjvvR+p+pCvnyOxd9aQWE0bjnSrgzWdgE c8ksiQ6yH1ta99HzBFDwneaxlQsPN8OW1pI0XmCa25GSOXNf5IwgYwRhqVKnz7uu j70MUp6UIpNcceBiWVrlyrF1QBM3iUsa50vQSAXN7qDlTELCu3NthpyyywV3CwML kPlUuRpx8YXXP1sPjV3Zfek/1ILqgftpXMImkmNSn+vZ/F8uM7RtnIECkOGS/hWI /Vp3S8rQGp/PJd/zIzW3VjwD4anL3g== =n2ru -----END PGP PUBLIC KEY BLOCK----- ``` ranger-1.9.4/LICENSE000066400000000000000000001045131471222561200140160ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ranger-1.9.4/Makefile000066400000000000000000000114021471222561200144430ustar00rootroot00000000000000# This file is part of ranger, the console file manager. # License: GNU GPL version 3, see the file "AUTHORS" for details. NAME = ranger VERSION = $(shell grep -m 1 -o '[0-9][0-9.]\+\S*' README.md) NAME_RIFLE = rifle VERSION_RIFLE = $(VERSION) SNAPSHOT_NAME ?= $(NAME)-$(VERSION)-$(shell git rev-parse HEAD | cut -b 1-8).tar.gz # Find suitable python version (need python >= 2.6 or 3.1): PYTHON ?= $(shell \ (python -c 'import sys; sys.exit(sys.version < "2.6")' && \ which python) \ || (which python3) \ || (python2 -c 'import sys; sys.exit(sys.version < "2.6")' && \ which python2) \ ) ifeq ($(PYTHON),) $(error No suitable python found.) endif SETUPOPTS ?= '--record=install_log.txt' DOCDIR ?= doc/pydoc DESTDIR ?= / PREFIX ?= /usr/local PYOPTIMIZE ?= 1 FILTER ?= . CWD = $(shell pwd) default: test compile @echo 'Run `make options` for a list of all options' options: help @echo @echo 'Options:' @echo 'PYTHON = $(PYTHON)' @echo 'PYOPTIMIZE = $(PYOPTIMIZE)' @echo 'DOCDIR = $(DOCDIR)' @echo 'DESTDIR = $(DESTDIR)' help: @echo 'make: Test and compile ranger.' @echo 'make install: Install $(NAME)' @echo 'make pypi_sdist: Release a new sdist to PyPI' @echo 'make clean: Remove the compiled files (*.pyc, *.pyo)' @echo 'make doc: Create the pydoc documentation' @echo 'make cleandoc: Remove the pydoc documentation' @echo 'make man: Compile the manpage with "pod2man"' @echo 'make manhtml: Compile the html manpage with "pod2html"' @echo 'make snapshot: Create a tar.gz of the current git revision' @echo 'make test: Test everything' @echo 'make test_pylint: Test using pylint' @echo 'make test_flake8: Test using flake8' @echo 'make test_doctest: Test using doctest' @echo 'make test_pytest: Test using pytest' @echo 'make test_other: Verify the manpage is complete' @echo 'make test_py: Run all python tests, including manpage completeness' @echo 'make test_shellcheck: Test using shellcheck' @echo 'make todo: Look for TODO and XXX markers in the source code' install: $(PYTHON) setup.py install $(SETUPOPTS) \ '--prefix=$(PREFIX)' '--root=$(DESTDIR)' \ --optimize=$(PYOPTIMIZE) compile: clean PYTHONOPTIMIZE=$(PYOPTIMIZE) $(PYTHON) -m compileall -q ranger clean: find ranger -regex .\*\.py[co]\$$ -delete find ranger -depth -name __pycache__ -type d -exec rm -r -- {} \; doc: cleandoc mkdir -p $(DOCDIR) cd $(DOCDIR); \ $(PYTHON) -c 'import pydoc, sys; \ sys.path[0] = "$(CWD)"; \ pydoc.writedocs("$(CWD)")' find . -name \*.html -exec sed -i 's|'"$(CWD)"'|../..|g' -- {} \; TEST_PATHS_MAIN = \ $(shell find ./ranger -mindepth 1 -maxdepth 1 -type d \ ! -name '__pycache__' \ ! -path './ranger/config' \ ! -path './ranger/data' \ ) \ ./ranger/__init__.py \ $(shell find ./doc/tools ./examples -type f -name '*.py') \ ./ranger.py \ ./setup.py \ ./tests TEST_PATH_CONFIG = ./ranger/config test_pylint: @echo "Running pylint..." pylint $(TEST_PATHS_MAIN) pylint --rcfile=$(TEST_PATH_CONFIG)/.pylintrc $(TEST_PATH_CONFIG) test_flake8: @echo "Running flake8..." flake8 $(TEST_PATHS_MAIN) $(TEST_PATH_CONFIG) test_doctest: @echo "Running doctests..." @set -e; \ for FILE in $(shell grep -IHm 1 doctest -r ranger | grep $(FILTER) | cut -d: -f1); do \ echo "Testing $$FILE..."; \ RANGER_DOCTEST=1 PYTHONPATH=".:"$$PYTHONPATH ${PYTHON} $$FILE; \ done test_pytest: @echo "Running py.test tests..." py.test tests test_py: test_pylint test_flake8 test_doctest test_pytest test_other @echo "Finished python and documentation tests!" test_shellcheck: @echo "Running shellcheck..." sed '2,$$s/^\(\s*\)#/\1/' ./ranger/data/scope.sh | shellcheck -a - test_other: @echo "Checking completeness of man page..." @tests/manpage_completion_test.py test: test_py test_shellcheck @echo "Finished testing: All tests passed!" doc/ranger.1: doc/ranger.pod README.md pod2man --stderr --center='ranger manual' \ --date='$(NAME)-$(VERSION)' \ --release=$(shell date -u '+%Y-%m-%d') \ doc/ranger.pod doc/ranger.1 doc/rifle.1: doc/rifle.pod README.md pod2man --stderr --center='rifle manual' \ --date='$(NAME_RIFLE)-$(VERSION_RIFLE)' \ --release=$(shell date -u '+%Y-%m-%d') \ doc/rifle.pod doc/rifle.1 man: doc/ranger.1 doc/rifle.1 manhtml: pod2html doc/ranger.pod --outfile=doc/ranger.1.html cleandoc: test -d $(DOCDIR) && rm -- $(DOCDIR)/*.html || true snapshot: git archive --prefix='$(NAME)-$(VERSION)/' --format=tar HEAD | gzip > $(SNAPSHOT_NAME) dist: snapshot todo: @grep --color -Ion '\(TODO\|XXX\).*' -r ranger .PHONY: clean cleandoc compile default dist doc help install man manhtml \ options snapshot test test_pylint test_flake8 test_doctest test_pytest \ test_other todo pypi_sdist ranger-1.9.4/README.md000066400000000000000000000146161471222561200142740ustar00rootroot00000000000000ranger 1.9.4 ============ [![Build Status](https://travis-ci.org/ranger/ranger.svg?branch=master)](https://travis-ci.org/ranger/ranger) latest packaged version(s) ranger is a console file manager with VI key bindings. It provides a minimalistic and nice curses interface with a view on the directory hierarchy. It ships with `rifle`, a file launcher that is good at automatically finding out which program to use for what file type. ![screenshot](https://raw.githubusercontent.com/ranger/ranger-assets/master/screenshots/screenshot.png) For `mc` aficionados there's also the multi-pane viewmode.

two panes multiple panes

This file describes ranger and how to get it to run. For instructions on the usage, please read the man page (`man ranger` in a terminal). See `HACKING.md` for development-specific information. For configuration, check the files in `ranger/config/` or copy the default config to `~/.config/ranger` with `ranger --copy-config` (see [instructions](#getting-started)). The `examples/` directory contains several scripts and plugins that demonstrate how ranger can be extended or combined with other programs. These files can be found in the git repository or in `/usr/share/doc/ranger`. A note to packagers: Versions meant for packaging are listed in the changelog on the website. About ----- * Authors: see `AUTHORS` file * License: GNU General Public License Version 3 * Website: https://ranger.github.io/ * Download: https://ranger.github.io/ranger-stable.tar.gz * Bug reports: https://github.com/ranger/ranger/issues * git clone https://github.com/ranger/ranger.git Design Goals ------------ * An easily maintainable file manager in a high level language * A quick way to switch directories and browse the file system * Keep it small but useful, do one thing and do it well * Console-based, with smooth integration into the unix shell Features -------- * UTF-8 Support (if your Python copy supports it) * Multi-column display * Preview of the selected file/directory * Common file operations (create/chmod/copy/delete/...) * Renaming multiple files at once * VIM-like console and hotkeys * Automatically determine file types and run them with correct programs * Change the directory of your shell after exiting ranger * Tabs, bookmarks, mouse support... Dependencies ------------ * Python (`>=2.6` or `>=3.1`) with the `curses` module and (optionally) wide-unicode support * A pager (`less` by default) ### Optional dependencies For general usage: * `file` for determining file types * `chardet` (Python package) for improved encoding detection of text files * `sudo` to use the "run as root" feature * `python-bidi` (Python package) to display right-to-left file names correctly (Hebrew, Arabic) For enhanced file previews (with `scope.sh`): * `img2txt` (from `caca-utils`) for ASCII-art image previews * `w3mimgdisplay`, `ueberzug`, `mpv`, `iTerm2`, `kitty`, `terminology` or `urxvt` for image previews * `convert` (from `imagemagick`) to auto-rotate images and for SVG previews * `ffmpegthumbnailer` for video thumbnails * `highlight`, `bat` or `pygmentize` for syntax highlighting of code * `atool`, `bsdtar`, `unrar` and/or `7z` to preview archives * `bsdtar`, `tar`, `unrar`, `unzip` and/or `zipinfo` (and `sed`) to preview archives as their first image * `lynx`, `w3m` or `elinks` to preview html pages * `pdftotext` or `mutool` (and `fmt`) for textual `pdf` previews, `pdftoppm` to preview as image * `djvutxt` for textual DjVu previews, `ddjvu` to preview as image * `calibre` or `epub-thumbnailer` for image previews of ebooks * `transmission-show` for viewing BitTorrent information * `mediainfo` or `exiftool` for viewing information about media files * `odt2txt` for OpenDocument text files (`odt`, `ods`, `odp` and `sxw`) * `python` or `jq` for JSON files * `fontimage` for font previews * `openscad` for 3D model previews (`stl`, `off`, `dxf`, `scad`, `csg`) Installing ---------- Use the package manager of your operating system to install ranger. You can also install ranger through PyPI: ```pip install ranger-fm```.
Check current version: Packaging status Packaging status
### Installing from a clone Note that you don't *have* to install ranger; you can simply run `ranger.py`. To install ranger manually: ``` sudo make install ``` This translates roughly to: ``` sudo python setup.py install --optimize=1 --record=install_log.txt ``` This also saves a list of all installed files to `install_log.txt`, which you can use to uninstall ranger. Getting Started --------------- After starting ranger, you can use the Arrow Keys or `h` `j` `k` `l` to navigate, `Enter` to open a file or `q` to quit. The third column shows a preview of the current file. The second is the main column and the first shows the parent directory. Ranger can automatically copy default configuration files to `~/.config/ranger` if you run it with the switch `--copy-config=( rc | scope | ... | all )`. See `ranger --help` for a description of that switch. Also check `ranger/config/` for the default configuration. Going Further --------------- * To get the most out of ranger, read the [Official User Guide](https://github.com/ranger/ranger/wiki/Official-user-guide). * For frequently asked questions, see the [FAQ](https://github.com/ranger/ranger/wiki/FAQ%3A-Frequently-Asked-Questions). * For more information on customization, see the [wiki](https://github.com/ranger/ranger/wiki). Community --------------- For help, support, or if you just want to hang out with us, you can find us here: * **IRC**: channel **#ranger** on [freenode](https://freenode.net/kb/answer/chat) * **Reddit**: [r/ranger](https://www.reddit.com/r/ranger/) ranger-1.9.4/doc/000077500000000000000000000000001471222561200135525ustar00rootroot00000000000000ranger-1.9.4/doc/cheatsheet.svg000066400000000000000000007725301471222561200164260ustar00rootroot00000000000000 image/svg+xml            R reload thisdirectory r :open_with ^R resetranger E edit e W show log w show back-ground tasks Q quit q close tab TAB prev. tab tab next tab ~ ` openbookmarks ! :shell 1 (1) ESC abort T t tag files Y y yank (3) U u undo ^U move uphalf page I i inspect file :rename(insert) O o sort P p paste (3) { [ move up inparent dir } traverse sub-directories ] move downin parent dir @ :shell %s 2 (1) # :shell -p 3 (1) $ 4 (1) % 5 (1) ^ 6 (1) & 7 (1) * 8 (1) ( 9 (1) ) 0 (1) _ - chmod (2) + chmod (2) = chmod (2) A :rename(append) a :rename (skipextension) S open shell s :shell D d cut (3) (4) move downhalf page ^D F f :find ^F move downone page G go to top g :cd ... H back inhistory h go up 1directory ^H togglehidden files J move downhalf page j move down K move uphalf page k move up L forward inhistory l enter dir/open file ^L redraw : console ; console ' openbookmarks " tag files withcustom tag CAPSLOCK SHIFT Z ZZ/ZQ = quit z toggleoptions X x ^C C c select files incertain order abort task V visual mode v invertselection B b ^B move upone page N searchprevious n search next ^N new tab M change (5)linemode m savebookmark < , > . ? show help (6) / :search F1 help F3 inspect file F4 edit F5 copy F6 cut F7 :mkdir F8 :delete F10 quit F2 F9 F11 F12 ranger cheatsheet https://ranger.github.io git clone https://github.com/ranger/ranger Macros can be used in commands. They are likeglobal variables with dynamic content: %f%d%s%t%c%any %rangerdir%space The base name of the current fileThe path of the current directoryThe names of the currently selected filesThe names of all tagged files in this directoryThe paths of the currently copied filesThe key used in a key binding with "<any>"Example: map x<any> shell -w echo %anyThe path to the ranger python moduleJust a space, to avoid typing trailing spaces Example: map yp shell echo %d/%f | xsel -iThey can be escaped by replacing % with %%. (1) numbers can be used as a quantifier in various commands, for example 5j will movethe cursor down 5 by lines, 3<space> selects 3 files, 4<TAB> moves you to the 4th tab.(2) the keys -, + and = change the permissions of files. See "man chmod". [+-][augo][rwxXst] (e.g. +gw means "add write permissions to the group) [+-][rwxXst] (e.g. -x means "remove execute permissions from everybody") <octal>= (e.g. 777= means "give full permissions to everybody")(3) yank, copy, paste: To copy files, select them with the cursor (or <space>, in case ofmultiple files) → type dd (to cut) or yy (to copy) → move to the destination → type pp.Type da (or ya) to add files to the copy buffer, allowing you to copy from multiple folders.(4) d also starts the key bindings dc (calculate size of the content of a directory), du/dU(calculate directory size with the "du" program), dD (open the console with ":delete")(5) M<key> changes the linemode - the way files are drawn. Mf draws just the file name,Mp draws permissions, Mi draws file type information, Mt draws metadata, as definedwith the :meta command. You can add custom linemodes as described in/usr/share/doc/ranger/examples/plugin_linemode.py(6) ? starts the key bindings m (man page), k (key bindings), c (commands), s (settings) Config files: run "ranger --copy-config=all" tocopy the default config files to ~/.config/ranger/. rc.conf: A list of commands that are executed when rangerstarts. Options, key bindings and aliases are found here.Pro tip: Adding "export RANGER_LOAD_DEFAULT_RC=FALSE" toyour shell rc will skip loading the default rc.conf before your own.commands.py: A python script containing custom commandsrifle.conf: Rules for rifle, the file opener. Each line looks like list of conditions = commandWhen ranger opens a file, it tests those conditions. The firstcommand where all conditions are true will be executed.scope.sh: The script that generates file previews.Plugins can be put in the plugins/ subdirectory, colorschemesin colorschemes/. See /usr/share/doc/ranger/examples. #ranger on irc.freenode.net Commands can be typed in by pressing : or added to ~/.config/ranger/rc.conf to apply then wheneverranger starts. All commands are listed in the man page. Some important ones: :shell [<flags>] <command> calls the given <command> with the shell specified in the environmentvariable $SHELL. <flags> can be "-f" to fork the process or "-p" to pipe the output to a pager. Macros like%f and %s are especially useful here. Example: ":shell -f inkscape %f" or ":shell sudo cp %c ./":alias <new> <old> creates the command <new> that calls <old>. The neat thing is that you can passarguments to the next command. Example: ":alias touch shell touch" will allow you to type ":touch FILE",which will be translated to ":shell touch FILE".:map <key> <command> makes the <key> run <command> when pressed. This is the typical way todefine key bindings in rc.conf. There is also "pmap" to define keys in the pager and "unmap" and "punmap"to remove key bindings. INSERT :touch SPACE mark move tofirst element move tolast element move downone page move upone page HOME END PAGE UP PAGE DOWN ranger-1.9.4/doc/colorschemes.md000066400000000000000000000116751471222561200165740ustar00rootroot00000000000000Colorschemes ============ This text explains colorschemes and how they work. Context Tags ------------ Context tags provide information about the context and are Boolean values (`True` or `False`). For example, if the tag `in_titlebar` is set, you probably want to know about the color of a part of the titlebar now. The default context tags are specified in `/ranger/gui/context.py` in the constant `CONTEXT_KEYS`. Custom tags can be specified in a custom plugin file in `~/.config/ranger/plugins/`. The code to use follows. ```python # Import the class import ranger.gui.context # Add your key names ranger.gui.context.CONTEXT_KEYS.append('my_key') # Set it to False (the default value) ranger.gui.context.Context.my_key = False # Or use an array for multiple names my_keys = ['key_one', 'key_two'] ranger.gui.context.CONTEXT_KEYS.append(my_keys) # Set them to False for key in my_keys: code = 'ranger.gui.context.Context.' + key + ' = False' exec(code) ``` As you may or may not have guessed, this only tells ranger that they exist, not what they mean. To do this, you'll have to dig around in the source code. As an example, let's walk through adding a key that highlights `README.md` files differently. All the following code will be written in a standalone plugin file. First, from above, we'll add the key `readme` and set it to `False`. ```python import ranger.gui.context ranger.gui.context.CONTEXT_KEYS.append('readme') ranger.gui.context.Context.readme = False ``` Then we'll use the hook `hook_before_drawing` to tell ranger that our key is talking about `README.md` files. ```python import ranger.gui.widgets.browsercolumn OLD_HOOK_BEFORE_DRAWING = ranger.gui.widgets.browsercolumn.hook_before_drawing def new_hook_before_drawing(fsobject, color_list): if fsobject.basename === 'README.md': color_list.append('readme') return OLD_HOOK_BEFORE_DRAWING(fsobject, color_list) ranger.gui.widgets.browsercolumn.hook_before_drawing = new_hook_before_drawing ``` Notice we call the old `hook_before_drawing`. This makes sure that we don't overwrite another plugin's code, we just append our own to it. To highlight it a different color, just [add it to your colorscheme][1] [1]:#adapt-a-colorscheme Implementation in the GUI Classes --------------------------------- The class `CursesShortcuts` in the file `/ranger/gui/curses_shortcuts.py` defines the methods `color(*tags)`, `color_at(y, x, wid, *tags)` and `color_reset()`. This class is a superclass of `Displayable`, so these methods are available almost everywhere. Something like `color("in_titlebar", "directory")` will be called to get the color of directories in the titlebar. This creates a `ranger.gui.context.Context` object, sets its attributes `in_titlebar` and `directory` to True, leaves the others as `False`, and passes it to the colorscheme's `use(context)` method. The Color Scheme ---------------- A colorscheme should be a subclass of `ranger.gui.ColorScheme` and define the method `use(context)`. By looking at the context, this use-method has to determine a 3-tuple of integers: `(foreground, background, attribute)` and return it. `foreground` and `background` are integers representing colors, `attribute` is another integer with each bit representing one attribute. These integers are interpreted by the terminal emulator in use. Abbreviations for colors and attributes are defined in `ranger.gui.color`. Two attributes can be combined via bitwise OR: `bold | reverse` Once the color for a set of tags is determined, it will be cached by default. If you want more dynamic colorschemes (such as a different color for very large files), you will need to dig into the source code, perhaps add a custom tag and modify the draw-method of the widget to use that tag. Run `tc_colorscheme` to check if your colorschemes are valid. Specify a Colorscheme --------------------- Colorschemes are searched for in these directories: - `~/.config/ranger/colorschemes/` - `/path/to/ranger/colorschemes/` To specify which colorscheme to use, change the option `colorscheme` in your rc.conf: `set colorscheme default`. This means, use the colorscheme contained in either `~/.config/ranger/colorschemes/default.py` or `/path/to/ranger/colorschemes/default.py`. Adapt a colorscheme ------------------- You may want to adapt a colorscheme to your needs without having a complete copy of it, but rather the changes only. Say, you want the exact same colors as in the default colorscheme, but the directories to be green rather than blue, because you find the blue hard to read. This is done in the jungle colorscheme `ranger/colorschemes/jungle`, check it out for implementation details. In short, I made a subclass of the default scheme, set the initial colors to the result of the default `use()` method and modified the colors how I wanted. This has the obvious advantage that you need to write less, which results in less maintenance work and a greater chance that your colorscheme will work with future versions of ranger. ranger-1.9.4/doc/config/000077500000000000000000000000001471222561200150175ustar00rootroot00000000000000ranger-1.9.4/doc/config/colorschemes/000077500000000000000000000000001471222561200175055ustar00rootroot00000000000000ranger-1.9.4/doc/config/colorschemes/default.py000077700000000000000000000000001471222561200303012../../../ranger/colorschemes/default.pyustar00rootroot00000000000000ranger-1.9.4/doc/config/colorschemes/jungle.py000077700000000000000000000000001471222561200300012../../../ranger/colorschemes/jungle.pyustar00rootroot00000000000000ranger-1.9.4/doc/config/colorschemes/snow.py000077700000000000000000000000001471222561200272052../../../ranger/colorschemes/snow.pyustar00rootroot00000000000000ranger-1.9.4/doc/config/commands.py000077700000000000000000000000001471222561200245112../../ranger/config/commands.pyustar00rootroot00000000000000ranger-1.9.4/doc/config/rc.conf000077700000000000000000000000001471222561200227112../../ranger/config/rc.confustar00rootroot00000000000000ranger-1.9.4/doc/config/rifle.conf000077700000000000000000000000001471222561200241032../../ranger/config/rifle.confustar00rootroot00000000000000ranger-1.9.4/doc/config/scope.sh000077700000000000000000000000001471222561200227412../../ranger/data/scope.shustar00rootroot00000000000000ranger-1.9.4/doc/howto-publish-a-release.md000066400000000000000000000052711471222561200205410ustar00rootroot00000000000000Prepare the "stable" branch --------------------------- Before you can do anything else, you need to decide what should be included in the new version. **Bugfix releases** bump the third number of the version, e.g. 1.9.0 -> 1.9.1. They may include bugfix commits that you `git cherry-pick`ed from the master branch into the stable branch, or you can just do a fast-forward merge of master into stable, if there were only bugfix commits since the last major version. You can also add minor new features that are very likely not causing any bugs. However, there should be absolutely **no** backward-incompatible changes, like: - renamed or removed settings, commands or python functions - renamed, removed or reordered function arguments - change in syntax of configuration files or in API of configuration scripts New settings are okay, just make sure a sane default value is defined. **Major releases** bump the second number of the version, e.g. 1.9.2 -> 1.10.0 and are necessary if you introduce any breaking changes, like the ones mentioned in the list above. Test everything ---------------- * [ ] `make test` * [ ] `./ranger.py [--clean]` * [ ] `ranger/ext/rifle.py` * [ ] `make install` Make a release commit --------------------- * [ ] Update the number in the `README` * [ ] Update `__version__` and `__release__` in `ranger/__init__.py` * [ ] Update `__version__` in `ranger/ext/rifle.py` * [ ] `make man` * [ ] Write changelog entry * [ ] Think of a witty commit message * [ ] Commit * [ ] Tag the signed release with `git tag -as vX.Y.Z`, using the same commit message as annotation * [ ] Push release and tag Make snapshot and test again ---------------------------- * [ ] Build `.tar.gz` with `make snapshot` * [ ] `make` * [ ] `make install` * [ ] Test the snapshot one last time Update the website ------------------ * [ ] Add the new version as `ranger-stable.tar.gz` * [ ] Add the new version as `ranger-X.Y.Z.tar.gz` * [ ] Update both signatures `gpg --local-user 0x00FB5CDF --sign --detach-sign ` * [ ] Update the man page * [ ] run `make manhtml` in ranger's repository * [ ] copy the generated `doc/ranger.1.html` to the `ranger.github.io` repository * [ ] Rebuild the website, see `README.md` in https://github.com/ranger/ranger.github.io * [ ] Commit & push the website Make a PyPI release ------------------- * [ ] `git clean --force -d -x` * [ ] `SETUPTOOLS_USE=1 python setup.py sdist` * [ ] `gpg --local-user 0x00000000 --detach-sign --armor dist/*` * [ ] `twine upload dist/*` Announce the update ------------------- * [ ] To the mailing list * [ ] In the arch linux forum Change back to before --------------------- * [ ] Change `__release__` in `ranger/__init__.py` back to `False` ranger-1.9.4/doc/ranger.1000066400000000000000000002337521471222561200151260ustar00rootroot00000000000000.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "RANGER 1" .TH RANGER 1 "ranger-1.9.4" "2024-11-04" "ranger manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh ranger \- visual file manager .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBranger\fR [\fB\-\-version\fR] [\fB\-\-help\fR] [\fB\-\-debug\fR] [\fB\-\-clean\fR] [\fB\-\-cachedir\fR=\fIdirectory\fR] [\fB\-\-confdir\fR=\fIdirectory\fR] [\fB\-\-datadir\fR=\fIdirectory\fR] [\fB\-\-copy\-config\fR=\fIwhich\fR] [\fB\-\-choosefile\fR=\fItarget\fR] [\fB\-\-choosefiles\fR=\fItarget\fR] [\fB\-\-choosedir\fR=\fItarget\fR] [\fB\-\-selectfile\fR=\fIfilepath\fR] [\fB\-\-show\-only\-dirs\fR] [\fB\-\-list\-unused\-keys\fR] [\fB\-\-list\-tagged\-files\fR=\fItag\fR] [\fB\-\-profile\fR] [\fB\-\-cmd\fR=\fIcommand\fR] [\fIpath ...\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" ranger is a console file manager with \s-1VI\s0 key bindings. .SH "RESOURCES" .IX Header "RESOURCES" This \fImanual\fR contains instructions on how to use and configure ranger. .PP Inside \fIranger\fR, you can press \fI?\fR for a list of key bindings, commands or settings. .PP The \fI\s-1README\s0\fR contains install instructions. .PP The file \fI\s-1HACKING\s0.md\fR contains guidelines for code modification. .PP The directory \fIdoc/configs\fR contains configuration files. They are usually installed to \fI/usr/share/doc/ranger/config\fR and can be obtained with ranger's \&\-\-copy\-config option. .PP The directory \fIexamples\fR contains reference implementations for ranger plugins, sample configuration files and some programs for integrating ranger with other software. They are usually installed to \&\fI/usr/share/doc/ranger/examples\fR. .PP The man page of \fBrifle\fR\|(1) describes the functions of the file opener .PP The section \fI\s-1LINKS\s0\fR of this man page contains further resources. .SH "POSITIONAL ARGUMENTS" .IX Header "POSITIONAL ARGUMENTS" .IP "\fIpath ...\fR" 14 .IX Item "path ..." Each path will be opened in a tab and if the path is a file it will be selected. Omitting this is equivalent to providing the current directory. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-d\fR, \fB\-\-debug\fR" 14 .IX Item "-d, --debug" Activate the debug mode: Whenever an error occurs, ranger will exit and print a full traceback. The default behavior is to merely print the name of the exception in the statusbar/log and try to keep running. .IP "\fB\-c\fR, \fB\-\-clean\fR" 14 .IX Item "-c, --clean" Activate the clean mode: ranger will not access or create any configuration files nor will it leave any traces on your system. This is useful when your configuration is broken, when you want to avoid clutter, etc. .IP "\fB\-\-cachedir\fR=\fIdir\fR" 14 .IX Item "--cachedir=dir" Change the cache directory of ranger from \f(CW$XDG_CACHE_HOME\fR or ~/.cache/ranger to \*(L"dir\*(R". .IP "\fB\-r\fR \fIdir\fR, \fB\-\-confdir\fR=\fIdir\fR" 14 .IX Item "-r dir, --confdir=dir" Change the configuration directory of ranger from \f(CW$XDG_CONFIG_HOME\fR or ~/.config/ranger to \*(L"dir\*(R". .IP "\fB\-\-datadir\fR=\fIdir\fR" 14 .IX Item "--datadir=dir" Change the data directory of ranger from \f(CW$XDG_DATA_HOME\fR or ~/.local/share/ranger to \*(L"dir\*(R". .IP "\fB\-\-copy\-config\fR=\fIfile\fR" 14 .IX Item "--copy-config=file" Create copies of the default configuration files in your local configuration directory. Existing ones will not be overwritten. Possible values: \fIall\fR, \&\fIcommands\fR, \fIcommands_full\fR, \fIrc\fR, \fIrifle\fR, \fIscope\fR. .Sp Note: You may want to disable loading of the global configuration files by exporting \fIRANGER_LOAD_DEFAULT_RC=FALSE\fR in your environment. See also: \&\fB\s-1FILES\s0\fR, \fB\s-1ENVIRONMENT\s0\fR .Sp \&\-\-copy\-config=\fBcommands\fR will copy only a small sample configuration file with a thoroughly commented example. It is recommended to keep this file tidy to avoid getting defunct commands on ranger upgrades. The full default commands.py can be copied with \-\-copy\-config=\fBcommands_full\fR, but that file will be ignored by ranger and serves only as a reference for making your own commands. .IP "\fB\-\-choosefile\fR=\fItargetfile\fR" 14 .IX Item "--choosefile=targetfile" Allows you to pick a file with ranger. This changes the behavior so that when you open a file, ranger will exit and write the absolute path of that file into \&\fItargetfile\fR. .IP "\fB\-\-choosefiles\fR=\fItargetfile\fR" 14 .IX Item "--choosefiles=targetfile" Allows you to pick multiple files with ranger. This changes the behavior so that when you open a file, ranger will exit and write the absolute paths of all selected files into \fItargetfile\fR, adding one newline after each filename. .IP "\fB\-\-choosedir\fR=\fItargetfile\fR" 14 .IX Item "--choosedir=targetfile" Allows you to pick a directory with ranger. When you exit ranger, it will write the last visited directory into \fItargetfile\fR. .IP "\fB\-\-selectfile\fR=\fItargetfile\fR" 14 .IX Item "--selectfile=targetfile" Open ranger with \fItargetfile\fR selected. This is a legacy option, superseded by the behavior for the \s-1POSITIONAL ARGUMENTS.\s0 .IP "\fB\-\-show\-only\-dirs\fR" 14 .IX Item "--show-only-dirs" Display only the directories. May be used in conjunction with \&\fB\-\-choosedir\fR=\fItargetfile\fR. .IP "\fB\-\-list\-unused\-keys\fR" 14 .IX Item "--list-unused-keys" List common keys which are not bound to any action in the \*(L"browser\*(R" context. This list is not complete, you can bind any key that is supported by curses: use the key code returned by \f(CW\*(C`getch()\*(C'\fR. .IP "\fB\-\-list\-tagged\-files\fR=\fItag\fR" 14 .IX Item "--list-tagged-files=tag" List all files which are tagged with the given tag. Note: Tags are single characters. The default tag is \*(L"*\*(R" .IP "\fB\-\-profile\fR" 14 .IX Item "--profile" Print statistics of \s-1CPU\s0 usage on exit. .IP "\fB\-\-cmd\fR=\fIcommand\fR" 14 .IX Item "--cmd=command" Execute the command after the configuration has been read. Use this option multiple times to run multiple commands. .IP "\fB\-\-version\fR" 14 .IX Item "--version" Print the version and exit. .IP "\fB\-h\fR, \fB\-\-help\fR" 14 .IX Item "-h, --help" Print a list of options and exit. .SH "CONCEPTS" .IX Header "CONCEPTS" This part explains how certain parts of ranger work and how they can be used efficiently. .SS "\s-1TAGS\s0" .IX Subsection "TAGS" Tags are single characters which are displayed left of a filename. You can use tags however you want. Press \*(L"t\*(R" to toggle tags and \*(L"ut\*(R" to remove any tags of the selection. The default tag is an Asterisk (\*(L"*\*(R"), but you can use any tag by typing \fI"\fR. .SS "\s-1PREVIEWS\s0" .IX Subsection "PREVIEWS" By default, only text files are previewed, but you can enable external preview scripts by setting the option \f(CW\*(C`use_preview_script\*(C'\fR and \f(CW\*(C`preview_files\*(C'\fR to true. .PP This default script is \fI\f(CI%rangerdir\fI/data/scope.sh\fR. It contains more documentation and calls to many external programs to generate previews. They are automatically used when available but completely optional. .IP "For general usage:" 2 .IX Item "For general usage:" .RS 2 .PD 0 .IP "\-" 2 .PD \&\f(CW\*(C`file\*(C'\fR for determining file types .IP "\-" 2 \&\f(CW\*(C`chardet\*(C'\fR (Python package) for improved encoding detection of text files .IP "\-" 2 \&\f(CW\*(C`sudo\*(C'\fR to use the \*(L"run as root\*(R" feature .IP "\-" 2 \&\f(CW\*(C`python\-bidi\*(C'\fR (Python package) to display right-to-left file names correctly (Hebrew, Arabic) .RE .RS 2 .RE .IP "For enhanced file previews (with scope.sh):" 2 .IX Item "For enhanced file previews (with scope.sh):" .RS 2 .PD 0 .IP "\-" 2 .PD \&\f(CW\*(C`img2txt\*(C'\fR (from \f(CW\*(C`caca\-utils\*(C'\fR) for ASCII-art image previews .IP "\-" 2 \&\f(CW\*(C`w3mimgdisplay\*(C'\fR, \f(CW\*(C`ueberzug\*(C'\fR, \f(CW\*(C`mpv\*(C'\fR, \f(CW\*(C`iTerm2\*(C'\fR, \f(CW\*(C`kitty\*(C'\fR, \f(CW\*(C`terminology\*(C'\fR or \&\f(CW\*(C`urxvt\*(C'\fR for image previews .IP "\-" 2 \&\f(CW\*(C`convert\*(C'\fR (from \f(CW\*(C`imagemagick\*(C'\fR) to auto-rotate images and for \s-1SVG\s0 previews .IP "\-" 2 \&\f(CW\*(C`ffmpegthumbnailer\*(C'\fR for video thumbnails .IP "\-" 2 \&\f(CW\*(C`highlight\*(C'\fR, \f(CW\*(C`bat\*(C'\fR or \f(CW\*(C`pygmentize\*(C'\fR for syntax highlighting of code .IP "\-" 2 \&\f(CW\*(C`atool\*(C'\fR, \f(CW\*(C`bsdtar\*(C'\fR, \f(CW\*(C`unrar\*(C'\fR and/or \f(CW\*(C`7z\*(C'\fR to preview archives .IP "\-" 2 \&\f(CW\*(C`bsdtar\*(C'\fR, \f(CW\*(C`tar\*(C'\fR, \f(CW\*(C`unrar\*(C'\fR, \f(CW\*(C`unzip\*(C'\fR and/or \f(CW\*(C`zipinfo\*(C'\fR (and \f(CW\*(C`sed\*(C'\fR) to preview archives as their first image .IP "\-" 2 \&\f(CW\*(C`lynx\*(C'\fR, \f(CW\*(C`w3m\*(C'\fR or \f(CW\*(C`elinks\*(C'\fR to preview html pages .IP "\-" 2 \&\f(CW\*(C`pdftotext\*(C'\fR or \f(CW\*(C`mutool\*(C'\fR (and \f(CW\*(C`fmt\*(C'\fR) for textual pdf previews, \f(CW\*(C`pdftoppm\*(C'\fR to preview as image .IP "\-" 2 \&\f(CW\*(C`djvutxt\*(C'\fR for textual DjVu previews, \f(CW\*(C`ddjvu\*(C'\fR to preview as image .IP "\-" 2 \&\f(CW\*(C`calibre\*(C'\fR or \f(CW\*(C`epub\-thumbnailer\*(C'\fR for image previews of ebooks .IP "\-" 2 \&\f(CW\*(C`transmission\-show\*(C'\fR for viewing BitTorrent information .IP "\-" 2 \&\f(CW\*(C`mediainfo\*(C'\fR or \f(CW\*(C`exiftool\*(C'\fR for viewing information about media files .IP "\-" 2 \&\f(CW\*(C`odt2txt\*(C'\fR for OpenDocument text files (odt, ods, odp and sxw) .IP "\-" 2 \&\f(CW\*(C`python\*(C'\fR or \f(CW\*(C`jq\*(C'\fR for \s-1JSON\s0 files .IP "\-" 2 \&\f(CW\*(C`fontimage\*(C'\fR for font previews .RE .RS 2 .RE .PP Install these programs (just the ones you need) and scope.sh will automatically use them. .PP Independently of the preview script, there is a feature to preview images by drawing them directly into the terminal. To enable this feature, set the option \f(CW\*(C`preview_images\*(C'\fR to true and enable one of the image preview modes: .PP \fIiTerm2\fR .IX Subsection "iTerm2" .PP This only works in iTerm2 compiled with image preview support, but works over ssh. .PP To enable this feature, set the option \f(CW\*(C`preview_images_method\*(C'\fR to iterm2. .PP This feature relies on the dimensions of the terminal's font. By default, a width of 8 and height of 11 are used. To use other values, set the options \&\f(CW\*(C`iterm2_font_width\*(C'\fR and \f(CW\*(C`iterm2_font_height\*(C'\fR to the desired values. .PP \fIkitty\fR .IX Subsection "kitty" .PP This only works in Kitty. It requires \s-1PIL\s0 (or pillow) to work. Allows remote image previews, for example in an ssh session. .PP To enable this feature, set the option \f(CW\*(C`preview_images_method\*(C'\fR to kitty. .PP \fIterminology\fR .IX Subsection "terminology" .PP This only works in terminology. It can render vector graphics, but works only locally. .PP To enable this feature, set the option \f(CW\*(C`preview_images_method\*(C'\fR to terminology. .PP \fIueberzug\fR .IX Subsection "ueberzug" .PP U\*:berzug is a command line utility which draws images on terminals using child windows. It requires \s-1PIL\s0 (or pillow) and relies on X11. This makes it compatible (in a limited way, i.e., tmux splits are not supported) with many terminals and tmux but not the Linux console or Wayland. .PP To enable this feature, set the option \f(CW\*(C`preview_images_method\*(C'\fR to ueberzug. .PP \fIurxvt\fR .IX Subsection "urxvt" .PP This only works in urxvt compiled with pixbuf support. Does not work over ssh. .PP Essentially this mode sets an image as a terminal background temporarily, so it will break any previously set image background. .PP To enable this feature, set the option \f(CW\*(C`preview_images_method\*(C'\fR to urxvt. .PP \fIurxvt-full\fR .IX Subsection "urxvt-full" .PP The same as urxvt but utilizing not only the preview pane but the whole terminal window. .PP To enable this feature, set the option \f(CW\*(C`preview_images_method\*(C'\fR to urxvt-full. .PP \fIw3m\fR .IX Subsection "w3m" .PP This does not work over ssh, requires certain terminals (tested on \*(L"xterm\*(R" and \&\*(L"urxvt\*(R") and is incompatible with tmux, although it works with screen. .PP To enable this feature, install the program \*(L"w3m\*(R" and set the option \&\f(CW\*(C`preview_images_method\*(C'\fR to w3m. .PP When using a terminal with a nonzero border which is not automatically detected, the w3m preview will be misaligned. Use the \f(CW\*(C`w3m_offset\*(C'\fR option to manually adjust the image offset. This should be the same value as the terminal's border value. .SS "\s-1SELECTION\s0" .IX Subsection "SELECTION" The \fIselection\fR is defined as \*(L"All marked files \s-1IF THERE ARE ANY,\s0 otherwise the current file.\*(R" Be aware of this when using the :delete command, which deletes all files in the selection. .PP You can mark files by pressing , v, etc. A yellow \fBMrk\fR symbol at the bottom right indicates that there are marked files in this directory. .SS "\s-1MACROS\s0" .IX Subsection "MACROS" Macros can be used in commands to abbreviate things. .PP .Vb 6 \& %f the highlighted file \& %d the path of the current directory \& %s the selected files in the current directory \& %t all tagged files in the current directory \& %c the full paths of the currently copied/cut files \& %p the full paths of selected files .Ve .PP The macros \f(CW%f\fR, \f(CW%d\fR, \f(CW%p\fR, and \f(CW%s\fR also have upper case variants, \f(CW%F\fR, \f(CW%D\fR, \f(CW%P\fR, and \&\f(CW%S\fR, which refer to the next tab. To refer to specific tabs, add a number in between. (%7s = selection of the seventh tab.) .PP \&\f(CW%c\fR is the only macro which ranges out of the current directory. So you may \&\*(L"abuse\*(R" the copying function for other purposes, like diffing two files which are in different directories: .PP .Vb 2 \& Yank the file A (type yy), move to the file B, then type \& @diff %c %f .Ve .PP Macros for file paths are generally shell-escaped so they can be used in the \&\f(CW\*(C`shell\*(C'\fR command. .PP When mapping keys you can use the placeholder , the key entered in that position can be used through the \f(CW%any\fR and \f(CW%any_path\fR macros. (When using multiple placeholders you can index the macros: \f(CW%any0\fR, \f(CW%any_path0\fR, \f(CW%any1\fR, \&\f(CW%any_path1\fR...) The macro \f(CW%any\fR will be replaced with the key pressed in the position of the placeholder. The macro \f(CW%any_path\fR will be replaced with the path of the bookmark mapped to the key pressed in the position of the placeholder. For example this macro can be used to echo the key that was pressed after \*(L"c\*(R": .PP .Vb 1 \& map c echo %any .Ve .PP \&\f(CW%any\fR is used in the ranger configuration to create a keybinding for adding a bookmark. c creates a bookmark for the current directory and the key for the bookmark is the first supplied argument. In this case the key pressed after \*(L"m\*(R": .PP .Vb 1 \& map m set_bookmark %any .Ve .PP The \f(CW%any_path\fR macro can be used to echo the path of the bookmark that is set to the key pressed after \*(L"c\*(R": .PP .Vb 1 \& map c echo %any_path .Ve .PP A practical example of the use of \f(CW%any_path\fR is the pasting of cut/copied files to a bookmarked directory: .PP .Vb 1 \& map p\*(Aq paste dest=%any_path .Ve .PP The macro \f(CW%rangerdir\fR expands to the directory of ranger's python library, you can use it for something like this command: alias show_commands shell less \f(CW%rangerdir\fR/config/commands.py .PP \&\f(CW%confdir\fR expands to the directory given by \fB\-\-confdir\fR. .PP \&\f(CW%datadir\fR expands to the directory given by \fB\-\-datadir\fR. .PP The macro \f(CW%space\fR expands to a space character. You can use it to add spaces to the end of a command when needed, while preventing editors to strip spaces off the end of the line automatically. .PP To write a literal %, you need to escape it by writing %%. .PP Note that macros are expanded twice when using chain. For example, to insert a space character in a chained command, you would write %%space: chain command1; command2%%space .SS "\s-1BOOKMARKS\s0" .IX Subsection "BOOKMARKS" Type \fBm\fR to bookmark the current directory. You can re-enter this directory by typing \fB`\fR. can be any letter or digit. Unlike vim, both lowercase and uppercase bookmarks are persistent. .PP Each time you jump to a bookmark, the special bookmark at key ` will be set to the last directory. So typing \*(L"``\*(R" gets you back to where you were before. .PP Bookmarks are selectable when tabbing in the :cd command. .PP Note: The bookmarks ' (Apostrophe) and ` (Backtick) are the same. .SS "\s-1RIFLE\s0" .IX Subsection "RIFLE" Rifle is the file opener of ranger. It can be used as a standalone program or a python module. It is located at \fI\f(CI$repo\fI/ranger/ext/rifle.py\fR. In contrast to other, more simple file openers, rifle can automatically find installed programs so it can be used effectively out of the box on a variety of systems. .PP It's configured in \fIrifle.conf\fR through a list of conditions and commands. For each line the conditions are checked and if they are met, the respective command is taken into consideration. By default, simply the first matching rule is used. In ranger, you can list and choose rules by typing \*(L"r\*(R" or simply by typing \*(L"\*(R". If you use rifle standalone, you can list all rules with the \*(L"\-l\*(R" option and pick a rule with \*(L"\-p \*(R". .PP The rules, along with further documentation, are contained in \&\fI\f(CI$repo\fI/ranger/config/rifle.conf\fR. .SS "\s-1FLAGS\s0" .IX Subsection "FLAGS" Flags give you a way to modify the behavior of the spawned process. They are used in the commands \f(CW\*(C`:open_with\*(C'\fR (key \*(L"r\*(R") and \f(CW\*(C`:shell\*(C'\fR (key \*(L"!\*(R"). .PP .Vb 6 \& f Fork the process, i.e. run in background. Please use this flag \& instead of calling "disown" or "nohup", to avoid killing the \& background command when pressing Ctrl+C in ranger. \& c Run the current file only, instead of the selection \& r Run application with root privilege (requires sudo) \& t Run application in a new terminal window .Ve .PP There are some additional flags that can currently be used only in the \f(CW\*(C`shell\*(C'\fR command: (for example \f(CW\*(C`:shell \-w df\*(C'\fR) .PP .Vb 3 \& p Redirect output to the pager \& s Silent mode. Output will be discarded. \& w Wait for an Enter\-press when the process is done .Ve .PP By default, all the flags are off unless otherwise specified in \fIrc.conf\fR key bindings or \fIrifle.conf\fR rules. You can specify as many flags as you want. An uppercase flag negates the effect: \*(L"ffcccFsf\*(R" is equivalent to \*(L"cs\*(R". .PP The terminal program name for the \*(L"t\*(R" flag is taken from the environment variable \f(CW$TERMCMD\fR. If it doesn't exist, it tries to extract it from \f(CW$TERM\fR, uses \*(L"x\-terminal-emulator\*(R" as a fallback, and then \*(L"xterm\*(R" if that fails. .PP Examples: \f(CW\*(C`:open_with c\*(C'\fR will open the file that you currently point at, even if you have selected other files. \f(CW\*(C`:shell \-w df\*(C'\fR will run \*(L"df\*(R" and wait for you to press Enter before switching back to ranger. .SS "\s-1PLUGINS\s0" .IX Subsection "PLUGINS" ranger's plugin system consists of python files which are located in \&\fI~/.config/ranger/plugins/\fR and are imported in alphabetical order when starting ranger. A plugin changes rangers behavior by overwriting or extending a function that ranger uses. This allows you to change pretty much every part of ranger, but there is no guarantee that things will continue to work in future versions as the source code evolves. .PP Adding new commands via a plugin as simple as specifying them like you would do in the \fIcommands.py\fR. .PP There are some hooks that are specifically made for the use in plugins. They are functions that start with hook_ and can be found throughout the code. .PP .Vb 1 \& grep \*(Aqdef hook_\*(Aq \-r /path/to/rangers/source .Ve .PP Also try: .PP .Vb 1 \& pydoc ranger.api .Ve .PP Note that you should \s-1NOT\s0 simply overwrite a function unless you know what you're doing. Instead, save the existing function and call it from your new one. This way, multiple plugins can use the same hook. There are several sample plugins in the \fI/usr/share/doc/ranger/examples/\fR directory, including a hello-world plugin that describes this procedure. .SH "KEY BINDINGS" .IX Header "KEY BINDINGS" Key bindings are defined in the file \fI\f(CI%rangerdir\fI/config/rc.conf\fR. Check this file for a list of all key bindings. You can copy it to your local configuration directory with the \-\-copy\-config=rc option. .PP Many key bindings take an additional numeric argument. Type \fI5j\fR to move down 5 lines, \fI2l\fR to open a file in mode 2, \fI10\fR to mark 10 files. .PP This list contains the most useful bindings: .SS "\s-1MAIN BINDINGS\s0" .IX Subsection "MAIN BINDINGS" .IP "h, j, k, l" 14 .IX Item "h, j, k, l" Move left, down, up or right .IP "^D or J, ^U or K" 14 .IX Item "^D or J, ^U or K" Move a half page down, up .IP "H, L" 14 .IX Item "H, L" Move back and forward in the history .IP "gg" 14 .IX Item "gg" Move to the top .IP "G" 14 .IX Item "G" Move to the bottom .IP "[, ]" 14 Move up and down in the parent directory. .IP "^R" 14 .IX Item "^R" Reload everything .IP "F" 14 .IX Item "F" Toggle \fIfreeze_files\fR setting. When active (indicated by a cyan \fI\s-1FROZEN\s0\fR message in the status bar), directories and files will not be loaded, improving performance when all the files you need are already loaded. This does not affect file previews, which can be toggled with \fIzI\fR. Also try disabling the preview of directories with \fIzP\fR. .IP "^L" 14 .IX Item "^L" Redraw the screen .IP "i" 14 .IX Item "i" Inspect the current file in a bigger window. .IP "E" 14 .IX Item "E" Edit the current file in \f(CW$VISUAL\fR otherwise \f(CW$EDITOR\fR otherwise \*(L"vim\*(R" .IP "S" 14 .IX Item "S" Open a shell in the current directory .IP "?" 14 Opens this man page .IP "W" 14 .IX Item "W" Opens the log window where you can review messages that pop up at the bottom. .IP "w" 14 .IX Item "w" Opens the task window where you can view and modify background processes that currently run in ranger. In there, you can type \*(L"dd\*(R" to abort a process and \&\*(L"J\*(R" or \*(L"K\*(R" to change the priority of a process. Only one process is run at a time. .IP "^C" 14 .IX Item "^C" Stop the currently running background process that ranger has started, like copying files, loading directories or file previews. .IP "=, +, \-" 14 .IX Item "=, +, -" Change the permissions of the selection. For example, \f(CW\*(C`777=\*(C'\fR is equivalent to \&\f(CW\*(C`chmod 777 %s\*(C'\fR, \f(CW\*(C`+ar\*(C'\fR does \f(CW\*(C`chmod a+r %s\*(C'\fR, \f(CW\*(C`\-ow\*(C'\fR does \f(CW\*(C`chmod o\-w %s\*(C'\fR etc. .IP "yy" 14 .IX Item "yy" Copy (yank) the selection, like pressing Ctrl+C in modern \s-1GUI\s0 programs. (You can also type \*(L"ya\*(R" to add files to the copy buffer, \*(L"yr\*(R" to remove files again, or \*(L"yt\*(R" for toggling.) .IP "dd" 14 .IX Item "dd" Cut the selection, like pressing Ctrl+X in modern \s-1GUI\s0 programs. (There are also \*(L"da\*(R", \*(L"dr\*(R" and \*(L"dt\*(R" shortcuts equivalent to \*(L"ya\*(R", \*(L"yr\*(R" and \*(L"yt\*(R".) .IP "pp" 14 .IX Item "pp" Paste the files which were previously copied or cut, like pressing Ctrl+V in modern \s-1GUI\s0 programs. .Sp Conflicts will be renamed by appending an '_' (and a counter if necessary), resulting in \f(CW\*(C`file.ext_\*(C'\fR, \f(CW\*(C`file.ext_0\*(C'\fR, etc. If you prefer \f(CW\*(C`file_.ext\*(C'\fR you can use the \f(CW\*(C`paste_ext\*(C'\fR command. .IP "po" 14 .IX Item "po" Paste the copied/cut files, overwriting existing files. .IP "pP, pO" 14 .IX Item "pP, pO" Like pp and po, but queues the operation so that it will be executed \fIafter\fR any other operations. Reminder: type \f(CW\*(C`w\*(C'\fR to open the task window. .IP "pl, pL" 14 .IX Item "pl, pL" Create symlinks (absolute or relative) to the copied files .IP "phl" 14 .IX Item "phl" Create hardlinks to the copied files .IP "pht" 14 .IX Item "pht" Duplicate the subdirectory tree of the copied directory, then create hardlinks for each contained file into the new directory tree. .IP "m\fIX\fR" 14 .IX Item "mX" Create a bookmark with the name \fIX\fR .IP "`\fIX\fR" 14 .IX Item "`X" Move to the bookmark with the name \fIX\fR .IP "n" 14 .IX Item "n" Find the next file. By default, this gets you to the newest file in the directory, but if you search something using the keys /, cm, ct, ..., it will get you to the next found entry. .IP "N" 14 .IX Item "N" Find the previous file. .IP "o\fIX\fR" 14 .IX Item "oX" Change the sort method (like in mutt) .IP "z\fIX\fR" 14 .IX Item "zX" Change settings. See the settings section for a list of settings and their hotkey. .IP "u\fI?\fR" 14 .IX Item "u?" Universal undo-key. Depending on the key that you press after \*(L"u\*(R", it either restores closed tabs (uq), removes tags (ut), clears the copy/cut buffer (ud), starts the reversed visual mode (uV) or clears the selection (uv). .IP "f" 14 .IX Item "f" Quickly navigate by entering a part of the filename. .IP "Space" 14 .IX Item "Space" Mark a file. .IP "v" 14 .IX Item "v" Toggle the mark-status of all files .IP "V" 14 .IX Item "V" Starts the visual mode, which selects all files between the starting point and the cursor until you press \s-1ESC.\s0 To unselect files in the same way, use \*(L"uV\*(R". .IP "/" 14 Search for files in the current directory. .IP ":" 14 Open the console. .IP "!" 14 Open the console with the content \*(L"shell \*(R" so you can quickly run commands .IP "@" 14 Open the console with the content \*(L"shell \f(CW%s\fR\*(R", placing the cursor before the \&\*(L" \f(CW%s\fR\*(R" so you can quickly run commands with the current selection as the argument. .IP "r" 14 .IX Item "r" Open the console with the content \*(L"open with \*(R" so you can decide which program to use to open the current file selection. .IP "cd" 14 .IX Item "cd" Open the console with the content \*(L"cd \*(R" .IP "^P" 14 .IX Item "^P" Open the console with the most recent command. .IP "Alt\-\fIN\fR" 14 .IX Item "Alt-N" Open a tab. N has to be a number from 0 to 9. If the tab doesn't exist yet, it will be created. .IP "Alt-l, Alt-r" 14 .IX Item "Alt-l, Alt-r" Shift a tab left, respectively right. .IP "gn, ^N" 14 .IX Item "gn, ^N" Create a new tab. .IP "gt, gT" 14 .IX Item "gt, gT" Go to the next or previous tab. You can also use \s-1TAB\s0 and \s-1SHIFT+TAB\s0 instead. .IP "gc, ^W" 14 .IX Item "gc, ^W" Close the current tab. The last tab cannot be closed this way. .IP "M" 14 .IX Item "M" A key chain that allows you to quickly change the line mode of all the files of the current directory. For a more permanent solution, use the command \&\*(L"default_linemode\*(R" in your rc.conf. .IP ".d" 14 .IX Item ".d" Apply the typefilter \*(L"directory\*(R". .IP ".f" 14 .IX Item ".f" Apply the typefilter \*(L"file\*(R". .IP ".l" 14 .IX Item ".l" Apply the typefilter \*(L"symlink\*(R". .IP ".m" 14 .IX Item ".m" Apply a new mimetype filter. .IP ".n" 14 .IX Item ".n" Apply a new filename filter. .IP ".#" 14 Apply a new hash filter. .IP ".""" 14 Apply a new duplicate filter. .IP ".'" 14 Apply a new unique filter. .IP ".|" 14 Combine the two topmost filters from the filter stack in the \f(CW\*(C`OR\*(C'\fR relationship, instead of the \f(CW\*(C`AND\*(C'\fR used implicitly. .IP ".&" 14 Explicitly combine the two topmost filters in the \f(CW\*(C`AND\*(C'\fR relationship. Usually not needed because filters are implicitly in this relationship though might be useful in more complicated scenarios. .IP ".!" 14 Negate the topmost filter. .IP ".r" 14 .IX Item ".r" Rotate the filter stack by N elements. Where N is provided as a numeric prefix like vim's \fIcount\fR and defaults to 1, i.e. move the topmost element to the bottom of the stack. .IP ".c" 14 .IX Item ".c" Clear the filter stack. .IP ".*" 14 Decompose the topmost filter combinator (e.g. \f(CW\*(C`.!\*(C'\fR, \f(CW\*(C`.|\*(C'\fR). .IP ".p" 14 .IX Item ".p" Pop the topmost filter from the filter stack. .IP ".." 14 Show the current filter stack state. .SS "READLINE-LIKE \s-1BINDINGS IN THE CONSOLE\s0" .IX Subsection "READLINE-LIKE BINDINGS IN THE CONSOLE" .IP "^B, ^F" 14 .IX Item "^B, ^F" Move left and right (B for back, F for forward) .IP "^P, ^N" 14 .IX Item "^P, ^N" Move up and down (P for previous, N for Next) .IP "^A, ^E" 14 .IX Item "^A, ^E" Move to the start or to the end .IP "Alt-B, Alt-LEFT" 14 .IX Item "Alt-B, Alt-LEFT" Move backwards by words. .IP "Alt-F, Alt-RIGHT" 14 .IX Item "Alt-F, Alt-RIGHT" Move forwards by words. .IP "^D" 14 .IX Item "^D" Delete the current character. .IP "^H" 14 .IX Item "^H" Backspace. .SH "MOUSE BUTTONS" .IX Header "MOUSE BUTTONS" .IP "Left Mouse Button" 4 .IX Item "Left Mouse Button" Click on something and you'll move there. To run a file, \*(L"enter\*(R" it, like a directory, by clicking on the preview. .IP "Right Mouse Button" 4 .IX Item "Right Mouse Button" Enter a directory or run a file. .IP "Scroll Wheel" 4 .IX Item "Scroll Wheel" Scrolls up or down. You can point at the column of the parent directory while scrolling to switch directories. .SH "SETTINGS" .IX Header "SETTINGS" This section lists all built-in settings of ranger. The valid types for the value are in [brackets]. The hotkey to toggle the setting is in , if a hotkey exists. .PP Settings can be changed in the file \fI~/.config/ranger/rc.conf\fR or on the fly with the command \fB:set option value\fR. Examples: .PP .Vb 2 \& set column_ratios 1,2,3 \& set show_hidden true .Ve .PP Toggling options can be done with: .PP .Vb 1 \& set show_hidden! .Ve .PP The different types of settings and an example for each type: .PP .Vb 7 \& setting type | example values \& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& bool | true, false \& integer | 1, 23, 1337 \& string | foo, hello world \& list | 1,2,3,4 \& none | none .Ve .PP You can view a list of all settings and their current values by pressing \*(L"3?\*(R" in ranger. .IP "automatically_count_files [bool]" 4 .IX Item "automatically_count_files [bool]" Should ranger count and display the number of files in each directory as soon as it's visible? This gets slow with remote file systems. Turning it off will still allow you to see the number of files after entering the directory. .IP "autosave_bookmarks [bool]" 4 .IX Item "autosave_bookmarks [bool]" Save bookmarks (used with mX and `X) instantly? This helps to synchronize bookmarks between multiple ranger instances but leads to *slight* performance loss. When false, bookmarks are saved when ranger is exited. .IP "autoupdate_cumulative_size [bool]" 4 .IX Item "autoupdate_cumulative_size [bool]" You can display the \*(L"real\*(R" cumulative size of directories by using the command :get_cumulative_size or typing \*(L"dc\*(R". The size is expensive to calculate and will not be updated automatically. You can choose to update it automatically though by turning on this option. .IP "cd_bookmarks [bool]" 4 .IX Item "cd_bookmarks [bool]" Specify whether bookmarks should be included in the tab completion of the \*(L"cd\*(R" command. .IP "cd_tab_case [string]" 4 .IX Item "cd_tab_case [string]" Changes case sensitivity for the \*(L"cd\*(R" command tab completion. Possible values are: .Sp .Vb 3 \& sensitive \& insensitive \& smart .Ve .IP "cd_tab_fuzzy [bool]" 4 .IX Item "cd_tab_fuzzy [bool]" Use fuzzy tab completion with the \*(L"cd\*(R" command. For example, \&\fB:cd /u/lo/b<\s-1TAB\s0>\fR expands to \fB:cd /usr/local/bin\fR. .IP "clear_filters_on_dir_change [bool]" 4 .IX Item "clear_filters_on_dir_change [bool]" If set to 'true', persistent filters would be cleared upon leaving the directory .IP "collapse_preview [bool] " 4 .IX Item "collapse_preview [bool] " When no preview is visible, should the last column be squeezed to make use of the whitespace? .IP "colorscheme [string]" 4 .IX Item "colorscheme [string]" Which colorscheme to use? These colorschemes are available by default: \&\fBdefault\fR, \fBjungle\fR, \fBsnow\fR. Snow is a monochrome scheme, jungle replaces blue directories with green ones for better visibility on certain terminals. .IP "column_ratios [list]" 4 .IX Item "column_ratios [list]" How many columns are there, and what are their relative widths? For example, a value of 1,1,1 would mean 3 evenly sized columns. 1,1,1,1,4 means 5 columns with the preview column being as large as the other columns combined. .IP "confirm_on_delete [string]" 4 .IX Item "confirm_on_delete [string]" Ask for a confirmation when running the \*(L"delete\*(R" command? Valid values are \&\*(L"always\*(R" (default), \*(L"never\*(R", \*(L"multiple\*(R". With \*(L"multiple\*(R", ranger will ask only if you delete multiple files at once. .IP "dirname_in_tabs [bool]" 4 .IX Item "dirname_in_tabs [bool]" Display the directory name in tabs? .IP "display_size_in_main_column [bool]" 4 .IX Item "display_size_in_main_column [bool]" Display the file size in the main column? .IP "display_size_in_status_bar [bool]" 4 .IX Item "display_size_in_status_bar [bool]" Display the file size in the status bar? .IP "display_free_space_in_status_bar [bool]" 4 .IX Item "display_free_space_in_status_bar [bool]" Display the free disk space in the status bar? .IP "display_tags_in_all_columns [bool]" 4 .IX Item "display_tags_in_all_columns [bool]" Display tags in all columns? .IP "draw_borders [string]" 4 .IX Item "draw_borders [string]" Draw borders around or between the columns? Possible values are: .Sp .Vb 4 \& none no borders of any sort \& outline draw an outline around all the columns \& separators draw only vertical lines between columns \& both both of the above .Ve .IP "draw_progress_bar_in_status_bar [bool]" 4 .IX Item "draw_progress_bar_in_status_bar [bool]" Draw a progress bar in the status bar which displays the average state of all currently running tasks which support progress bars? .IP "flushinput [bool] " 4 .IX Item "flushinput [bool] " Flush the input after each key hit? One advantage is that when scrolling down with \*(L"j\*(R", ranger stops scrolling instantly when you release the key. One disadvantage is that when you type commands blindly, some keys might get lost. .IP "freeze_files [bool] " 4 .IX Item "freeze_files [bool] " When active, directories and files will not be loaded, improving performance when all the files you need are already loaded. This does not affect file previews. .IP "global_inode_type_filter [string]" 4 .IX Item "global_inode_type_filter [string]" Like filter_inode_type, but globally for all directories. Useful in combination with \fB\-\-choosedir\fR: .Sp .Vb 1 \& ranger \-\-choosedir=/tmp/x \-\-cmd=\*(Aqset global_inode_type_filter d\*(Aq .Ve .IP "hidden_filter [string]" 4 .IX Item "hidden_filter [string]" A regular expression pattern for files which should be hidden. For example, this pattern will hide all files that start with a dot or end with a tilde. .Sp .Vb 1 \& set hidden_filter ^\e.|~$ .Ve .IP "hint_collapse_threshold [int]" 4 .IX Item "hint_collapse_threshold [int]" The key hint lists up to this size have their sublists expanded. Otherwise the submaps are replaced with \*(L"...\*(R". .IP "hostname_in_titlebar [bool]" 4 .IX Item "hostname_in_titlebar [bool]" Show hostname in titlebar? .IP "size_in_bytes [bool]" 4 .IX Item "size_in_bytes [bool]" Print file sizes in bytes instead of the default human-readable format. .IP "idle_delay [integer]" 4 .IX Item "idle_delay [integer]" The delay that ranger idly waits for user input, in milliseconds, with a resolution of 100ms. Lower delay reduces lag between directory updates but increases \s-1CPU\s0 load. .IP "iterm2_font_height [integer]" 4 .IX Item "iterm2_font_height [integer]" Change the assumed font height in iTerm2, which may help with iTerm image previews .IP "iterm2_font_width [integer]" 4 .IX Item "iterm2_font_width [integer]" Change the assumed font width in iTerm2, which may help with iTerm image previews .IP "line_numbers [string]" 4 .IX Item "line_numbers [string]" Show line numbers in main column. Possible values are: .Sp .Vb 3 \& false turn the feature off \& absolute absolute line numbers for use with "gg" \& relative relative line numbers for "k" or "j" .Ve .IP "max_console_history_size [integer, none]" 4 .IX Item "max_console_history_size [integer, none]" How many console commands should be kept in history? \*(L"none\*(R" will disable the limit. .IP "max_history_size [integer, none]" 4 .IX Item "max_history_size [integer, none]" How many directory changes should be kept in history? .IP "metadata_deep_search [bool]" 4 .IX Item "metadata_deep_search [bool]" When the metadata manager module looks for metadata, should it only look for a \&\*(L".metadata.json\*(R" file in the current directory, or do a deep search and check all directories above the current one as well? .IP "mouse_enabled [bool] " 4 .IX Item "mouse_enabled [bool] " Enable mouse input? .IP "nested_ranger_warning [string]" 4 .IX Item "nested_ranger_warning [string]" Warn at startup if \f(CW\*(C`RANGER_LEVEL\*(C'\fR is greater than 0, in other words give a warning when you nest ranger in a subshell started by ranger. Allowed values are \f(CW\*(C`true\*(C'\fR, \f(CW\*(C`false\*(C'\fR and \f(CW\*(C`error\*(C'\fR. The special value \f(CW\*(C`error\*(C'\fR promotes the warning to an error, this is usually shown as red text but will crash ranger when run with the \f(CW\*(C`\-\-debug\*(C'\fR flag. .IP "one_indexed [bool]" 4 .IX Item "one_indexed [bool]" Start line numbers from 1. Possible values are: .Sp .Vb 2 \& false start line numbers from 0 \& true start line numbers from 1 .Ve .IP "open_all_images [bool]" 4 .IX Item "open_all_images [bool]" Open all images in this directory when running certain image viewers like feh or sxiv? You can still open selected files by marking them. .Sp If there would be too many files for the system to handle, this option will be temporarily disabled automatically. .IP "padding_right [bool]" 4 .IX Item "padding_right [bool]" When collapse_preview is on and there is no preview, should there remain a little padding on the right? This allows you to click into that space to run the file. .IP "preview_directories [bool] " 4 .IX Item "preview_directories [bool] " Preview directories in the preview column? .IP "preview_files [bool] " 4 .IX Item "preview_files [bool] " Preview files in the preview column? .IP "preview_images [bool]" 4 .IX Item "preview_images [bool]" Draw images inside the console with the external program w3mimgpreview? .IP "preview_images_method [string]" 4 .IX Item "preview_images_method [string]" Set the preview image method. Supported methods: w3m, iterm2, urxvt, urxvt-full, terminology. See \fI\s-1PREVIEWS\s0\fR section. .IP "preview_max_size [int]" 4 .IX Item "preview_max_size [int]" Avoid previewing files that exceed a certain size, in bytes. Use a value of 0 to disable this feature. .IP "preview_script [string, none]" 4 .IX Item "preview_script [string, none]" Which script should handle generating previews? If the file doesn't exist, or use_preview_script is off, ranger will handle previews itself by just printing the content. .IP "relative_current_zero [bool]" 4 .IX Item "relative_current_zero [bool]" When line_numbers is set to relative, show 0 on the current line if true or show the absolute number of the current line when false. .IP "save_backtick_bookmark [bool]" 4 .IX Item "save_backtick_bookmark [bool]" Save the \f(CW\*(C`\`\*(C'\fR bookmark to disk. This bookmark is used to switch to the last directory by typing \f(CW\*(C`\`\`\*(C'\fR. .IP "save_console_history [bool]" 4 .IX Item "save_console_history [bool]" Should the console history be saved on exit? If disabled, the console history is reset when you restart ranger. .IP "save_tabs_on_exit [bool]" 4 .IX Item "save_tabs_on_exit [bool]" Save all tabs, except the active, on exit? The last saved tabs are restored once when starting the next session. Multiple sessions are stored in a stack and the oldest saved tabs are restored first. .IP "scroll_offset [integer]" 4 .IX Item "scroll_offset [integer]" Try to keep this much space between the top/bottom border when scrolling. .IP "shorten_title [integer]" 4 .IX Item "shorten_title [integer]" Trim the title of the window if it gets long? The number defines how many directories are displayed at once. A value of 0 turns off this feature. .IP "show_cursor [bool]" 4 .IX Item "show_cursor [bool]" Always show the terminal cursor? .IP "show_hidden_bookmarks [bool]" 4 .IX Item "show_hidden_bookmarks [bool]" Show dotfiles in the bookmark preview window? (Type ') .IP "show_hidden [bool] , <^H>" 4 .IX Item "show_hidden [bool] , <^H>" Show hidden files? .IP "show_selection_in_titlebar [bool]" 4 .IX Item "show_selection_in_titlebar [bool]" Add the highlighted file to the path in the titlebar .IP "sort_case_insensitive [bool] " 4 .IX Item "sort_case_insensitive [bool] " Sort case-insensitively? If true, \*(L"a\*(R" will be listed before \*(L"B\*(R" even though its \s-1ASCII\s0 value is higher. .IP "sort_directories_first [bool] " 4 .IX Item "sort_directories_first [bool] " Sort directories first? .IP "sort_reverse [bool] " 4 .IX Item "sort_reverse [bool] " Reverse the order of files? .IP "sort_unicode [bool]" 4 .IX Item "sort_unicode [bool]" When sorting according to some string, should the unicode characters be compared, instead of looking at the raw character values to save time? .IP "sort [string] , , , , , , , , " 4 .IX Item "sort [string] , , , , , , , , " Which sorting mechanism should be used? Choose one of \fBatime\fR, \fBbasename\fR, \&\fBctime\fR, \fBextension\fR, \fBmtime\fR, \fBnatural\fR, \fBtype\fR, \fBsize\fR, \fBrandom\fR .Sp Note: You can reverse the order by typing an uppercase second letter in the key combination, e.g. \*(L"oN\*(R" to sort from Z to A. .IP "status_bar_on_top [bool]" 4 .IX Item "status_bar_on_top [bool]" Put the status bar at the top of the window? .IP "tilde_in_titlebar [bool]" 4 .IX Item "tilde_in_titlebar [bool]" Abbreviate \f(CW$HOME\fR with ~ in the titlebar (first line) of ranger? .IP "unicode_ellipsis [bool]" 4 .IX Item "unicode_ellipsis [bool]" Use a unicode \*(L"...\*(R" character instead of \*(L"~\*(R" to mark cut-off filenames? .IP "bidi_support [bool]" 4 .IX Item "bidi_support [bool]" Try to properly display file names in \s-1RTL\s0 languages (Hebrew, Arabic) by using a \s-1BIDI\s0 algorithm to reverse the relevant parts of the text. Requires the python-bidi pip package. .IP "update_title [bool]" 4 .IX Item "update_title [bool]" Set a window title? Updates both the \fI\s-1WM_NAME\s0\fR and \fI\s-1WM_ICON_NAME\s0\fR properties. .IP "update_tmux_title [bool]" 4 .IX Item "update_tmux_title [bool]" Set the tmux/screen \fIwindow-name\fR to \*(L"ranger\*(R"? .IP "use_preview_script [bool] " 4 .IX Item "use_preview_script [bool] " Use the preview script defined in the setting \fIpreview_script\fR? .IP "vcs_aware [bool]" 4 .IX Item "vcs_aware [bool]" Gather and display data about version control systems. Supported vcs: git, hg. .IP "vcs_backend_git, vcs_backend_hg, vcs_backend_bzr, vcs_backend_svn [string]" 4 .IX Item "vcs_backend_git, vcs_backend_hg, vcs_backend_bzr, vcs_backend_svn [string]" Sets the state for the version control backend. The possible values are: .Sp .Vb 4 \& disabled Don\*(Aqt display any information. \& local Display only local state. \& enabled Display both, local and remote state. \& May be slow for hg and bzr. .Ve .IP "vcs_msg_length [int]" 4 .IX Item "vcs_msg_length [int]" Length to truncate first line of the commit messages to when shown in the statusbar. Defaults to 50. .IP "viewmode [string]" 4 .IX Item "viewmode [string]" Sets the view mode, which can be \fBmiller\fR to display the files in the traditional miller column view that shows multiple levels of the hierarchy, or \&\fBmultipane\fR to use multiple panes (one per tab) similar to midnight-commander. .IP "w3m_delay [float]" 4 .IX Item "w3m_delay [float]" Delay in seconds before displaying an image with the w3m method. Increase it in case of experiencing display corruption. .IP "w3m_offset [int]" 4 .IX Item "w3m_offset [int]" Offset in pixels for the inner border of the terminal. Some terminals require the offset to be specified explicitly, among others st and UXterm, some don't like urxvt. .IP "wrap_plaintext_previews [bool]" 4 .IX Item "wrap_plaintext_previews [bool]" Whether or not to wrap long lines in the pager, this includes previews of plain text files. .IP "wrap_scroll [bool]" 4 .IX Item "wrap_scroll [bool]" Enable scroll wrapping \- moving down while on the last item will wrap around to the top and vice versa. .IP "xterm_alt_key [bool]" 4 .IX Item "xterm_alt_key [bool]" Enable this if key combinations with the Alt Key don't work for you. (Especially on xterm) .SH "COMMANDS" .IX Header "COMMANDS" You can enter the commands in the console which is opened by pressing \*(L":\*(R". .PP You can always get a list of the currently existing commands by typing \*(L"?c\*(R" in ranger. For your convenience, this is a list of the \*(L"public\*(R" commands including their parameters, excluding descriptions: .PP .Vb 10 \& alias [newcommand] [oldcommand] \& bulkrename \& cd [path] \& chain command1[; command2[; command3...]] \& chmod octal_number \& cmap key command \& console [\-pSTARTPOSITION] command \& copycmap key newkey [newkey2...] \& copymap key newkey [newkey2...] \& copypmap key newkey [newkey2...] \& copytmap key newkey [newkey2...] \& cunmap keys... \& default_linemode [path=regexp | tag=tags] linemodename \& delete \& echo [text] \& edit [filename] \& eval [\-q] python_code \& filter [string] \& filter_inode_type [dfl] \& find pattern \& flat level \& grep pattern \& help \& jump_non [\-FLAGS...] \& linemode linemodename \& load_copy_buffer \& map key command \& mark pattern \& mark_tag [tags] \& meta key value \& mkdir dirname \& open_with [application] [flags] [mode] \& pmap key command \& prompt_metadata [key1 [key2 [...]]] \& punmap keys... \& quit \& quit! \& quitall \& quitall! \& relink newpath \& rename_append [\-FLAGS...] \& rename newname \& save_copy_buffer \& scout [\-FLAGS...] pattern \& search pattern \& search_inc pattern \& set option value \& setintag tags option value \& setlocal [path=] option value \& shell [\-FLAGS...] command \& source filename \& terminal \& tmap key command \& touch filename \& trash \& travel pattern \& tunmap keys... \& unmap keys... \& unmark pattern \& unmark_tag [tags] .Ve .PP There are additional commands which are directly translated to python functions, one for every method in the ranger.core.actions.Actions class. They are not documented here, since they are mostly for key bindings, not to be typed in by a user. Read the source if you are interested in them. .PP These are the public commands including their descriptions: .IP "alias [\fInewcommand\fR] [\fIoldcommand\fR]" 2 .IX Item "alias [newcommand] [oldcommand]" Copies the oldcommand as newcommand. .IP "bulkrename" 2 .IX Item "bulkrename" This command opens a list of selected files in an external editor. After you edit and save the file, it will generate a shell script which does bulk renaming according to the changes you did in the file. .Sp This shell script is opened in an editor for you to review. After you close it, it will be executed. .IP "cd [\fIpath\fR]" 2 .IX Item "cd [path]" The cd command changes the directory. If path is a file, selects that file. The command \f(CW\*(C`:cd \-\*(C'\fR is equivalent to typing ``. .IP "chain \fIcommand1\fR[; \fIcommand2\fR[; \fIcommand3\fR...]]" 2 .IX Item "chain command1[; command2[; command3...]]" Combines multiple commands into one, separated by semicolons. .IP "chmod \fIoctal_number\fR" 2 .IX Item "chmod octal_number" Sets the permissions of the selection to the octal number. .Sp The octal number is between 000 and 777. The digits specify the permissions for the user, the group and others. A 1 permits execution, a 2 permits writing, a 4 permits reading. Add those numbers to combine them. So a 7 permits everything. .Sp Key bindings in the form of [\-+] and = also exist. For example, \fB+ar\fR allows reading for everyone, \-ow forbids others to write and 777= allows everything. .Sp See also: man 1 chmod .IP "console [\-p\fIN\fR] \fIcommand\fR" 2 .IX Item "console [-pN] command" Opens the console with the command already typed in. The cursor is placed at \&\fIN\fR. .IP "copymap \fIkey\fR \fInewkey\fR [\fInewkey2\fR ...]" 2 .IX Item "copymap key newkey [newkey2 ...]" .PD 0 .IP "copycmap \fIkey\fR \fInewkey\fR [\fInewkey2\fR ...]" 2 .IX Item "copycmap key newkey [newkey2 ...]" .IP "copypmap \fIkey\fR \fInewkey\fR [\fInewkey2\fR ...]" 2 .IX Item "copypmap key newkey [newkey2 ...]" .IP "copytmap \fIkey\fR \fInewkey\fR [\fInewkey2\fR ...]" 2 .IX Item "copytmap key newkey [newkey2 ...]" .PD Copies the keybinding \fIkey\fR to \fInewkey\fR in the \*(L"browser\*(R" context. This is a deep copy, so if you change the new binding (or parts of it) later, the old one is not modified. For example, \fIcopymap j down\fR will make the key sequence \&\*(L"down\*(R" move the cursor down one item. .Sp To copy key bindings of the console, pager or taskview use \*(L"copycmap\*(R", \&\*(L"copypmap\*(R" or \*(L"copytmap\*(R" respectively. .IP "default_linemode [\fIpath=regexp\fR | \fItag=tags\fR] \fIlinemodename\fR" 2 .IX Item "default_linemode [path=regexp | tag=tags] linemodename" Sets the default linemode. See \fIlinemode\fR command. .Sp Examples: .Sp Set the global default linemode to \*(L"permissions\*(R": :default_linemode permissions .Sp Set the default linemode to \*(L"permissions\*(R" for all files tagged with \*(L"p\*(R" or \*(L"P\*(R": :default_linemode tag=pP permissions .Sp Set the default linemode for all files in ~/books/ to \*(L"metatitle\*(R": :default_linemode path=/home/.*?/books/.* metatitle .IP "delete" 2 .IX Item "delete" Destroy all files in the selection with a roundhouse kick. ranger will ask for a confirmation if you attempt to delete multiple (marked) files or non-empty directories. This can be changed by modifying the setting \*(L"confirm_on_delete\*(R". .IP "echo \fItext\fR" 2 .IX Item "echo text" Display the text in the statusbar. .IP "edit [\fIfilename\fR]" 2 .IX Item "edit [filename]" Edit the current file or the file in the argument. .IP "eval [\fI\-q\fR] \fIpython_code\fR" 2 .IX Item "eval [-q] python_code" Evaluates the python code. `fm' is a reference to the \s-1FM\s0 instance. To display text, use the function `p'. The result is displayed on the screen unless you use the \*(L"\-q\*(R" option. .Sp Examples: :eval fm :eval len(fm.tabs) :eval p(\*(L"Hello World!\*(R") .IP "filter [\fIstring\fR]" 2 .IX Item "filter [string]" Displays only the files which contain the \fIstring\fR in their basename. Running this command without any parameter will reset the filter. .Sp This command is based on the \fIscout\fR command and supports all of its options. .IP "filter_inode_type [dfl]" 2 .IX Item "filter_inode_type [dfl]" Displays only the files of specified inode type. To display only directories, use the 'd' parameter. To display only files, use the 'f' parameter. To display only links, use the 'l' parameter. Parameters can be combined. To remove this filter, use no parameter. .IP "filter_stack [\fIcommand\fR [\fIargs\fR]]" 2 .IX Item "filter_stack [command [args]]" Manage the filter stack, adding, removing and manipulating filters. For example, to show only duplicate files and symlinks: .Sp .Vb 5 \& :filter_stack add type f \& :filter_stack add duplicate \& :filter_stack add and \& :filter_stack add type l \& :filter_stack add or .Ve .Sp Or using the mapped keys: .Sp .Vb 1 \& .f ." .& .l .| .Ve .Sp Available subcommands: .RS 2 .IP "add \s-1FILTER_TYPE\s0 [\s-1ARGS...\s0]" 2 .IX Item "add FILTER_TYPE [ARGS...]" Add a new filter to the top of the filter stack. Each filter on the stack is applied in turn, resulting in an implicit logical \f(CW\*(C`AND\*(C'\fR relation. The following \f(CW\*(C`FILTER_TYPE\*(C'\fRs are available: .RS 2 .IP "duplicate" 2 .IX Item "duplicate" Filter files so only files that have duplicates in the same directory are shown. Useful when cleaning up identical songs and memes that were saved using distinct file names. .IP "filename \s-1NAME\s0" 2 .IX Item "filename NAME" Filter files that contain \s-1NAME\s0 in the filename, regular expression syntax is allowed. .IP "hash \s-1PATH\s0" 2 .IX Item "hash PATH" Filter files so only files with the same hash as \s-1PATH\s0 are shown. .IP "mimetype \s-1TYPE\s0" 2 .IX Item "mimetype TYPE" Filter files of a certain \s-1MIME\s0 type, regular expression syntax is allowed. .IP "typefilter [d|f|l]" 2 .IX Item "typefilter [d|f|l]" Filter files of a certain type, \f(CW\*(C`d\*(C'\fR for directories, \f(CW\*(C`f\*(C'\fR for files and \f(CW\*(C`l\*(C'\fR for symlinks. .IP "unique" 2 .IX Item "unique" Filter files so only unique files and the oldest file of every set of duplicates is shown. .IP "and" 2 .IX Item "and" Explicitly combine the two topmost filters in the \*(L"\s-1AND\*(R"\s0 relationship. Usually not needed because filters are implicitly in this relationship though might be useful in more complicated scenarios. .IP "not" 2 .IX Item "not" Negate the topmost filter. .IP "or" 2 .IX Item "or" Combine the two topmost filters from the filter stack in the \*(L"\s-1OR\*(R"\s0 relationship, instead of the \*(L"\s-1AND\*(R"\s0 used implicitly. .RE .RS 2 .RE .IP "pop" 2 .IX Item "pop" Pop the topmost filter from the filter stack. .IP "decompose" 2 .IX Item "decompose" Decompose the topmost filter combinator (e.g. \f(CW\*(C`.!\*(C'\fR, \f(CW\*(C`.|\*(C'\fR). .IP "rotate [N=1]" 2 .IX Item "rotate [N=1]" Rotate the filter stack by N elements. Where N is passed as argument or as a numeric prefix like vim's \fIcount\fR, default to 1, i.e. move the topmost element to the bottom of the stack. .IP "clear" 2 .IX Item "clear" Clear the filter stack. .IP "show" 2 .IX Item "show" Show the current filter stack state. .RE .RS 2 .RE .IP "find \fIpattern\fR" 2 .IX Item "find pattern" Search files in the current directory that contain the given (case-insensitive) string in their name as you type. Once there is an unambiguous result, it will be run immediately. (Or entered, if it's a directory.) .Sp This command is based on the \fIscout\fR command and supports all of its options. .IP "flat level" 2 .IX Item "flat level" Flattens the directory view up to the specified level. Level \-1 means infinite level. Level 0 means standard view without flattened directory view. Level values \-2 and less are invalid. .IP "grep \fIpattern\fR" 2 .IX Item "grep pattern" Looks for a string in all marked files or directories. .IP "help" 2 .IX Item "help" Provides a quick way to view ranger documentations. .IP "jump_non [\-\fIflags\fR...]" 2 .IX Item "jump_non [-flags...]" Jumps to first non-directory if highlighted file is a directory and vice versa. .Sp Flags: \-r Jump in reverse order \-w Wrap around if reaching end of filelist .IP "linemode \fIlinemodename\fR" 2 .IX Item "linemode linemodename" Sets the linemode of all files in the current directory. The linemode may be: .Sp .Vb 10 \& "filename": \& display each line as "..." \& "fileinfo": \& display each line as "..." \& "mtime": \& display each line as "..." in ISO format \& "humanreadablemtime": \& display each line as "..." in a human readable \& format, more precise the more recent. \& "sizemtime": \& display each line as "... " in ISO format \& "humanreadablesizemtime": \& display each line as "... " in a human \& readable format, more precise the more recent. \& "permissions": \& display each line as " " \& "metatitle": \& display metadata from .metadata.json files if available, fall back \& to the "filename" linemode if no metadata was found. \& See :meta command. .Ve .Sp The custom linemodes may be added by subclassing the \fILinemodeBase\fR class. See the \fIranger.core.linemode\fR module for some examples. .IP "load_copy_buffer" 2 .IX Item "load_copy_buffer" Load the copy buffer from \fI~/.config/ranger/copy_buffer\fR. This can be used to pass the list of copied files to another ranger instance. .IP "map \fIkey\fR \fIcommand\fR" 2 .IX Item "map key command" .PD 0 .IP "cmap \fIkey\fR \fIcommand\fR" 2 .IX Item "cmap key command" .IP "pmap \fIkey\fR \fIcommand\fR" 2 .IX Item "pmap key command" .IP "tmap \fIkey\fR \fIcommand\fR" 2 .IX Item "tmap key command" .PD Assign the key combination to the given command. Whenever you type the key/keys, the command will be executed. Additionally, if you use a quantifier when typing the key, like 5j, it will be passed to the command as the attribute \&\*(L"self.quantifier\*(R". .Sp The keys you bind with this command are accessible in the file browser only, not in the console, pager or taskview. To bind keys there, use the commands \&\*(L"cmap\*(R", \*(L"pmap\*(R" or \*(L"tmap\*(R". .IP "mark \fIpattern\fR" 2 .IX Item "mark pattern" Mark all files matching the regular expression pattern. .Sp This command is based on the \fIscout\fR command and supports all of its options. .IP "mark_tag [\fItags\fR]" 2 .IX Item "mark_tag [tags]" Mark all tags that are tagged with either of the given tags. When leaving out the tag argument, all tagged files are marked. .IP "meta \fIkey\fR \fIvalue\fR" 2 .IX Item "meta key value" Set the metadata of the currently highlighted file. Example: .Sp .Vb 2 \& :meta title The Hitchhiker\*(Aqs Guide to the Galaxy \& :meta year 1979 .Ve .Sp This metadata can be displayed by, for example, using the \*(L"metatitle\*(R" line mode by typing Mt. .IP "mkdir \fIdirname\fR" 2 .IX Item "mkdir dirname" Creates a directory with the name \fIdirname\fR. .IP "open_with [\fIapplication\fR] [\fIflags\fR] [\fImode\fR]" 2 .IX Item "open_with [application] [flags] [mode]" Open the selected files with the given application, unless it is omitted, in which case the default application is used. \fIflags\fR change the way the application is executed and are described in their own section in this man page. The \fImode\fR is a number that specifies which application to use. The list of applications is generated by the external file opener \*(L"rifle\*(R" and can be displayed when pressing \*(L"r\*(R" in ranger. .Sp Note that if you specify an application, the mode is ignored. .IP "prompt_metadata [\fIkeys ...\fR]" 2 .IX Item "prompt_metadata [keys ...]" Prompt the user to input metadata with the \f(CW\*(C`meta\*(C'\fR command for multiple keys in a row. .IP "quit" 2 .IX Item "quit" Closes the current tab, if there's only one tab. Otherwise quits if there are no tasks in progress. The current directory will be bookmarked as ' so you can re-enter it by typing `` or '' the next time you start ranger. .IP "quit!" 2 .IX Item "quit!" Like \f(CW\*(C`quit\*(C'\fR, except will force quit even if tasks are in progress. .IP "quitall" 2 .IX Item "quitall" Like \f(CW\*(C`quit\*(C'\fR, except will quit even if multiple tabs are open. .IP "quitall!" 2 .IX Item "quitall!" Like \f(CW\*(C`quitall\*(C'\fR, except will force quit even if tasks are in progress. .IP "relink \fInewpath\fR" 2 .IX Item "relink newpath" Change the link destination of the current symlink file to . First will load the original link. .IP "rename \fInewname\fR" 2 .IX Item "rename newname" Rename the current file. If a file with that name already exists, the renaming will fail. Also try the key binding A for appending something to a file name. .IP "rename_append [\-\fIflags\fR...]" 2 .IX Item "rename_append [-flags...]" Opens the console with \*(L":rename \*(R" with the cursor positioned before the file extension. .Sp Flags: \-a Position before all extensions \-r Remove everything before extensions .IP "save_copy_buffer" 2 .IX Item "save_copy_buffer" Save the copy buffer to \fI~/.config/ranger/copy_buffer\fR. This can be used to pass the list of copied files to another ranger instance. .IP "scout [\-\fIflags\fR...] [\-\-] \fIpattern\fR" 2 .IX Item "scout [-flags...] [--] pattern" Swiss army knife command for searching, traveling and filtering files. .Sp Flags: \-a Automatically open a file on unambiguous match \-e Open the selected file when pressing enter \-f Filter files that match the current search pattern \-g Interpret pattern as a glob pattern \-i Ignore the letter case of the files \-k Keep the console open when changing a directory with the command \-l Letter skipping; e.g. allow \*(L"rdme\*(R" to match the file \*(L"readme\*(R" \-m Mark the matching files after pressing enter \-M Unmark the matching files after pressing enter \-p Permanent filter: hide non-matching files after pressing enter \-r Interpret pattern as a regular expression pattern \-s Smart case; like \-i unless pattern contains upper case letters \-t Apply filter and search pattern as you type \-v Inverts the match .Sp Multiple flags can be combined. For example, \*(L":scout \-gpt\*(R" would create a :filter\-like command using globbing. .IP "search \fIpattern\fR" 2 .IX Item "search pattern" Search files in the current directory that match the given (case insensitive) regular expression pattern. .Sp This command is based on the \fIscout\fR command and supports all of its options. .IP "search_inc \fIpattern\fR" 2 .IX Item "search_inc pattern" Search files in the current directory that match the given (case insensitive) regular expression pattern. This command gets you to matching files as you type. .Sp This command is based on the \fIscout\fR command and supports all of its options. .IP "set \fIoption\fR \fIvalue\fR" 2 .IX Item "set option value" Assigns a new value to an option. Valid options are listed in the settings section. Use tab completion to get the current value of an option, though this doesn't work for functions and regular expressions. Valid values are: .Sp .Vb 7 \& setting type | example values \& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& bool | true, false \& integer | 1, 23, 1337 \& string | foo, hello world \& list | 1,2,3,4 \& none | none .Ve .IP "setintag \fItags\fR \fIoption\fR \fIvalue\fR" 2 .IX Item "setintag tags option value" Assigns a new value to an option, but locally for the directories that are marked with \fItag\fR. This means, that this option only takes effect when visiting that directory. .Sp For example, to change the sorting order in your downloads directory, tag it with the \fIv\fR tag by typing \fI"v\fR, then use this command: .Sp .Vb 1 \& setintag v sort ctime .Ve .IP "setlocal [path=\fIpath\fR] \fIoption\fR \fIvalue\fR" 2 .IX Item "setlocal [path=path] option value" Assigns a new value to an option, but locally for the directory given by \&\fIpath\fR. This means, that this option only takes effect when visiting that directory. If no path is given, uses the current directory. .Sp \&\fIpath\fR is a regular expression. This means that \f(CW\*(C`path=~/dl\*(C'\fR applies to all paths that start with \fI~/dl\fR, e.g. \fI~/dl2\fR and \fI~/dl/foo\fR. To avoid this, use \f(CW\*(C`path=~/dl$\*(C'\fR. .Sp \&\fIpath\fR can be quoted with either single or double quotes to prevent unwanted splitting. \fIpath='~/dl dl$'\fR or \fIpath=\*(L"~/dl dl$\*(R"\fR .IP "shell [\-\fIflags\fR] \fIcommand\fR" 2 .IX Item "shell [-flags] command" Run a shell command. \fIflags\fR are discussed in their own section. .IP "source \fIfilename\fR" 2 .IX Item "source filename" Reads commands from a file and executes them in the ranger console. .Sp This can be used to re-evaluate the rc.conf file after changing it: .Sp .Vb 2 \& map X chain shell vim \-p %confdir/rc.conf %rangerdir/config/rc.conf; \e \& source %confdir/rc.conf .Ve .IP "scroll_preview \fIvalue\fR" 2 .IX Item "scroll_preview value" Scroll the file preview by \fIvalue\fR lines. .IP "terminal" 2 .IX Item "terminal" Spawns the \fIx\-terminal-emulator\fR starting in the current directory. .IP "touch \fIfilename\fR" 2 .IX Item "touch filename" Creates an empty file with the name \fIfilename\fR, unless it already exists. .IP "trash" 2 .IX Item "trash" Move all files in the selection to the trash using rifle. Rifle tries to use a trash manager like \fItrash-cli\fR if available but will fall back to moving files to either \fI\f(CI$XDG_DATA_HOME\fI/ranger\-trash\fR or \fI~/.ranger/ranger\-trash\fR. This is a less permanent version of \fIdelete\fR, relying on the user to clear out the trash whenever it's convenient. While having the possibility of restoring trashed files until this happens. ranger will ask for a confirmation if you attempt to trash multiple (marked) files or non-empty directories. This can be changed by modifying the setting \*(L"confirm_on_delete\*(R". .IP "travel \fIpattern\fR" 2 .IX Item "travel pattern" Filters the current directory for files containing the letters in the string, possibly with other letters in between. The filter is applied as you type. When only one directory is left, it is entered and the console is automatically reopened, allowing for fast travel. To close the console, press \s-1ESC\s0 or execute a file. .Sp This command is based on the \fIscout\fR command and supports all of its options. .IP "unmap [\fIkeys\fR ...]" 2 .IX Item "unmap [keys ...]" .PD 0 .IP "cunmap [\fIkeys\fR ...]" 2 .IX Item "cunmap [keys ...]" .IP "punmap [\fIkeys\fR ...]" 2 .IX Item "punmap [keys ...]" .IP "tunmap [\fIkeys\fR ...]" 2 .IX Item "tunmap [keys ...]" .PD Removes the given key mappings in the \*(L"browser\*(R" context. To unmap key bindings in the console, pager, or taskview use \*(L"cunmap\*(R", \*(L"punmap\*(R" or \*(L"tunmap\*(R". .IP "unmark \fIpattern\fR" 2 .IX Item "unmark pattern" Unmark all files matching a regular expression pattern. .Sp This command is based on the \fIscout\fR command and supports all of its options. .IP "unmark_tag [\fItags\fR]" 2 .IX Item "unmark_tag [tags]" Unmark all tags that are tagged with either of the given tags. When leaving out the tag argument, all tagged files are unmarked. .SH "FILES" .IX Header "FILES" ranger reads several configuration files which are located in \&\fI\f(CI$HOME\fI/.config/ranger\fR or \fI\f(CI$XDG_CONFIG_HOME\fI/ranger\fR if \f(CW$XDG_CONFIG_HOME\fR is defined. You can use the \-\-copy\-config option to obtain the default configuration files. The files contain further documentation. .PP \&\fIrc.conf\fR, \fIcommands.py\fR and \fIcolorschemes\fR do not need to be copied fully as they will only be adding to the default configuration files except if explicitly overridden. This may lead to some confusing situations, for example when a key is being bound despite the corresponding line being removed from the user's copy of the configuration file. This behavior may be disabled with an environment variable (see also: \fB\s-1ENVIRONMENT\s0\fR). Note: All other configuration files only read from one source; i.e. default \s-1OR\s0 user, not both. \&\fIrc.conf\fR and \fIcommands.py\fR are additionally read from \fI/etc/ranger\fR if they exist for system-wide configuration, user configuration overrides system configuration which overrides the default configuration. .PP When starting ranger with the \fB\-\-clean\fR option, it will not access or create any of these files. .SS "\s-1CONFIGURATION\s0" .IX Subsection "CONFIGURATION" .IP "rc.conf" 10 .IX Item "rc.conf" Contains a list of commands which are executed on startup. Mostly key bindings and settings are defined here. .IP "commands.py" 10 .IX Item "commands.py" A python module that defines commands which can be used in ranger's console by typing \*(L":\*(R" or in the rc.conf file. Note that you can define commands in the same manner within plugins. .IP "commands_full.py" 10 .IX Item "commands_full.py" This file is copied by \-\-copy\-config=commands_full and serves as a reference for custom commands. It is entirely ignored by ranger. .IP "rifle.conf" 10 .IX Item "rifle.conf" This is the configuration file for the built-in file launcher called \*(L"rifle\*(R". .IP "scope.sh" 10 .IX Item "scope.sh" This is a script that handles file previews. When the options \&\fIuse_preview_script\fR and \fIpreview_files\fR are set, the program specified in the option \fIpreview_script\fR is run and its output and/or exit code determines rangers reaction. .IP "colorschemes/" 10 .IX Item "colorschemes/" Colorschemes can be placed here. .IP "plugins/" 10 .IX Item "plugins/" Plugins can be placed here. .SS "\s-1STORAGE\s0" .IX Subsection "STORAGE" .IP "bookmarks" 10 .IX Item "bookmarks" This file contains a list of bookmarks. The syntax is /^(.):(.*)$/. The first character is the bookmark key and the rest after the colon is the path to the file. In ranger, bookmarks can be set by typing m, accessed by typing \&' and deleted by typing um. .IP "copy_buffer" 10 .IX Item "copy_buffer" When running the command :save_copy_buffer, the paths of all currently copied files are saved in this file. You can later run :load_copy_buffer to copy the same files again, pass them to another ranger instance or process them in a script. .IP "history" 10 .IX Item "history" Contains a list of commands that have been previously typed in. .IP "tagged" 10 .IX Item "tagged" Contains a list of tagged files. The syntax is /^(.:)?(.*)$/ where the first letter is the optional name of the tag and the rest after the optional colon is the path to the file. In ranger, tags can be set by pressing t and removed with T. To assign a named tag, type ". .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" These environment variables have an effect on ranger: .IP "\s-1RANGER_LEVEL\s0" 8 .IX Item "RANGER_LEVEL" ranger sets this environment variable to \*(L"1\*(R" or increments it if it already exists. External programs can determine whether they were spawned from ranger by checking for this variable. .IP "\s-1RANGER_LOAD_DEFAULT_RC\s0" 8 .IX Item "RANGER_LOAD_DEFAULT_RC" If this variable is set to \s-1FALSE,\s0 ranger will not load the default rc.conf. This can save time if you copied the whole rc.conf to \fI~/.config/ranger/\fR and don't need the default one at all. .IP "\s-1VISUAL\s0" 8 .IX Item "VISUAL" Defines the editor to be used for the \*(L"E\*(R" key. Falls back to \s-1EDITOR\s0 if undefined or empty. .IP "\s-1EDITOR\s0" 8 .IX Item "EDITOR" Defines the editor to be used for the \*(L"E\*(R" key if \s-1VISUAL\s0 is undefined or empty. Defaults to \*(L"vim\*(R". .IP "\s-1SHELL\s0" 8 .IX Item "SHELL" Defines the shell that ranger is going to use with the :shell command and the \*(L"S\*(R" key. Defaults to \*(L"/bin/sh\*(R". .IP "\s-1TERMCMD\s0" 8 .IX Item "TERMCMD" Defines the terminal emulator command that ranger is going to use with the :terminal command and the \*(L"t\*(R" run flag. Defaults to \*(L"xterm\*(R". .IP "\s-1BAT_STYLE\s0" 8 .IX Item "BAT_STYLE" Specifies the theme to be used for syntax highlighting when \fIbat\fR is installed, unless \fIhighlight\fR is also installed. Find out possible values by running \f(CW\*(C`bat \-\-list\-themes\*(C'\fR. .IP "\s-1PYGMENTIZE_STYLE\s0" 8 .IX Item "PYGMENTIZE_STYLE" Specifies the theme to be used for syntax highlighting when \fIpygmentize\fR is installed, unless \fIhighlight\fR is also installed. Find out possible values by running: python \-c 'import pygments.styles; [print(stl) for stl in pygments.styles.\fBget_all_styles()\fR]' .IP "\s-1HIGHLIGHT_STYLE\s0" 8 .IX Item "HIGHLIGHT_STYLE" Specifies the theme to be used for syntax highlighting when \fIhighlight\fR is installed. Find out possible values by running \f(CW\*(C`highlight \-\-list\-themes\*(C'\fR. .IP "\s-1HIGHLIGHT_TABWIDTH\s0" 8 .IX Item "HIGHLIGHT_TABWIDTH" Specifies the number of spaces to use to replace tabs in \fIhighlight\fRed files. .IP "\s-1HIGHLIGHT_OPTIONS\s0" 8 .IX Item "HIGHLIGHT_OPTIONS" \&\fIhighlight\fR will pick up command line options specified in this variable. A \&\f(CW\*(C`\-\-style=\*(C'\fR option specified here will override \f(CW\*(C`HIGHLIGHT_STYLE\*(C'\fR. Similarly, \&\f(CW\*(C`\-\-replace\-tabs=\*(C'\fR will override \f(CW\*(C`HIGHLIGHT_TABWIDTH\*(C'\fR. .IP "\s-1OPENSCAD_COLORSCHEME\s0" 8 .IX Item "OPENSCAD_COLORSCHEME" Specifies the colorscheme used by \fIopenscad\fR while previewing 3D models. Read \&\fIopenscad\fR man page for colorschemes. Ranger will default to Tomorrow Night. .IP "\s-1OPENSCAD_IMGSIZE\s0" 8 .IX Item "OPENSCAD_IMGSIZE" Specifies the internal resolution \fIopenscad\fR will use for rendering 3D models. The image will be downscaled to fit the preview pane. This resolution will default to \*(L"1000,1000\*(R" if no value is set. .IP "\s-1XDG_CONFIG_HOME\s0" 8 .IX Item "XDG_CONFIG_HOME" Specifies the directory for configuration files. Defaults to \fI\f(CI$HOME\fI/.config\fR. .IP "\s-1PYTHONOPTIMIZE\s0" 8 .IX Item "PYTHONOPTIMIZE" This variable determines the optimize level of python. .Sp Using PYTHONOPTIMIZE=1 (like python \-O) will make python discard assertion statements. You will gain efficiency at the cost of losing some debug info. .Sp Using PYTHONOPTIMIZE=2 (like python \-OO) will additionally discard any docstrings. Using this will disable the key on commands. .IP "W3MIMGDISPLAY_PATH" 8 .IX Item "W3MIMGDISPLAY_PATH" By changing this variable, you can change the path of the executable file for image previews. By default, it is set to \fI/usr/lib/w3m/w3mimgdisplay\fR. .SH "EXAMPLES" .IX Header "EXAMPLES" There are various examples on how to extend ranger with plugins or combine ranger with other programs. These can be found in the \&\fI/usr/share/doc/ranger/examples/\fR directory, or the \fIdoc/ranger/\fR that is provided along with the source code. .SH "LICENSE" .IX Header "LICENSE" \&\s-1GNU\s0 General Public License 3 or (at your option) any later version. .SH "LINKS" .IX Header "LINKS" .IP "Download: " 4 .IX Item "Download: " .PD 0 .IP "The project page: " 4 .IX Item "The project page: " .IP "The mailing list: " 4 .IX Item "The mailing list: " .IP "\s-1IRC\s0 channel: #ranger on freenode.net" 4 .IX Item "IRC channel: #ranger on freenode.net" .PD .PP ranger is maintained with the git version control system. To fetch a fresh copy, run: .PP .Vb 1 \& git clone git@github.com:ranger/ranger.git .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBrifle\fR\|(1) .SH "BUGS" .IX Header "BUGS" Report bugs here: .PP Please include as much relevant information as possible. For the most diagnostic output, run ranger like this: \f(CW\*(C`PYTHONOPTIMIZE= ranger \-\-debug\*(C'\fR ranger-1.9.4/doc/ranger.desktop000066400000000000000000000004241471222561200164230ustar00rootroot00000000000000[Desktop Entry] Type=Application Name=ranger Comment=Launches the ranger file manager Icon=utilities-terminal Terminal=true Exec=ranger Categories=ConsoleOnly;System;FileTools;FileManager MimeType=inode/directory; Keywords=File;Manager;Browser;Explorer;Launcher;Vi;Vim;Python ranger-1.9.4/doc/ranger.pod000066400000000000000000001703051471222561200155420ustar00rootroot00000000000000=encoding utf8 =head1 NAME ranger - visual file manager =head1 SYNOPSIS B [B<--version>] [B<--help>] [B<--debug>] [B<--clean>] [B<--cachedir>=I] [B<--confdir>=I] [B<--datadir>=I] [B<--copy-config>=I] [B<--choosefile>=I] [B<--choosefiles>=I] [B<--choosedir>=I] [B<--selectfile>=I] [B<--show-only-dirs>] [B<--list-unused-keys>] [B<--list-tagged-files>=I] [B<--profile>] [B<--cmd>=I] [I] =head1 DESCRIPTION ranger is a console file manager with VI key bindings. =head1 RESOURCES This I contains instructions on how to use and configure ranger. Inside I, you can press I for a list of key bindings, commands or settings. The F contains install instructions. The file F contains guidelines for code modification. The directory F contains configuration files. They are usually installed to F and can be obtained with ranger's --copy-config option. The directory F contains reference implementations for ranger plugins, sample configuration files and some programs for integrating ranger with other software. They are usually installed to F. The man page of rifle(1) describes the functions of the file opener The section I of this man page contains further resources. =head1 POSITIONAL ARGUMENTS =over 14 =item I Each path will be opened in a tab and if the path is a file it will be selected. Omitting this is equivalent to providing the current directory. =back =head1 OPTIONS =over 14 =item B<-d>, B<--debug> Activate the debug mode: Whenever an error occurs, ranger will exit and print a full traceback. The default behavior is to merely print the name of the exception in the statusbar/log and try to keep running. =item B<-c>, B<--clean> Activate the clean mode: ranger will not access or create any configuration files nor will it leave any traces on your system. This is useful when your configuration is broken, when you want to avoid clutter, etc. =item B<--cachedir>=I Change the cache directory of ranger from $XDG_CACHE_HOME or ~/.cache/ranger to "dir". =item B<-r> I, B<--confdir>=I Change the configuration directory of ranger from $XDG_CONFIG_HOME or ~/.config/ranger to "dir". =item B<--datadir>=I Change the data directory of ranger from $XDG_DATA_HOME or ~/.local/share/ranger to "dir". =item B<--copy-config>=I Create copies of the default configuration files in your local configuration directory. Existing ones will not be overwritten. Possible values: I, I, I, I, I, I. Note: You may want to disable loading of the global configuration files by exporting I in your environment. See also: B, B --copy-config=B will copy only a small sample configuration file with a thoroughly commented example. It is recommended to keep this file tidy to avoid getting defunct commands on ranger upgrades. The full default commands.py can be copied with --copy-config=B, but that file will be ignored by ranger and serves only as a reference for making your own commands. =item B<--choosefile>=I Allows you to pick a file with ranger. This changes the behavior so that when you open a file, ranger will exit and write the absolute path of that file into I. =item B<--choosefiles>=I Allows you to pick multiple files with ranger. This changes the behavior so that when you open a file, ranger will exit and write the absolute paths of all selected files into I, adding one newline after each filename. =item B<--choosedir>=I Allows you to pick a directory with ranger. When you exit ranger, it will write the last visited directory into I. =item B<--selectfile>=I Open ranger with I selected. This is a legacy option, superseded by the behavior for the POSITIONAL ARGUMENTS. =item B<--show-only-dirs> Display only the directories. May be used in conjunction with B<--choosedir>=I. =item B<--list-unused-keys> List common keys which are not bound to any action in the "browser" context. This list is not complete, you can bind any key that is supported by curses: use the key code returned by C. =item B<--list-tagged-files>=I List all files which are tagged with the given tag. Note: Tags are single characters. The default tag is "*" =item B<--profile> Print statistics of CPU usage on exit. =item B<--cmd>=I Execute the command after the configuration has been read. Use this option multiple times to run multiple commands. =item B<--version> Print the version and exit. =item B<-h>, B<--help> Print a list of options and exit. =back =head1 CONCEPTS This part explains how certain parts of ranger work and how they can be used efficiently. =head2 TAGS Tags are single characters which are displayed left of a filename. You can use tags however you want. Press "t" to toggle tags and "ut" to remove any tags of the selection. The default tag is an Asterisk ("*"), but you can use any tag by typing I<">. =head2 PREVIEWS By default, only text files are previewed, but you can enable external preview scripts by setting the option C and C to true. This default script is F<%rangerdir/data/scope.sh>. It contains more documentation and calls to many external programs to generate previews. They are automatically used when available but completely optional. =over 2 =item For general usage: =over 2 =item - C for determining file types =item - C (Python package) for improved encoding detection of text files =item - C to use the "run as root" feature =item - C (Python package) to display right-to-left file names correctly (Hebrew, Arabic) =back =item For enhanced file previews (with scope.sh): =over 2 =item - C (from C) for ASCII-art image previews =item - C, C, C, C, C, C or C for image previews =item - C (from C) to auto-rotate images and for SVG previews =item - C for video thumbnails =item - C, C or C for syntax highlighting of code =item - C, C, C and/or C<7z> to preview archives =item - C, C, C, C and/or C (and C) to preview archives as their first image =item - C, C or C to preview html pages =item - C or C (and C) for textual pdf previews, C to preview as image =item - C for textual DjVu previews, C to preview as image =item - C or C for image previews of ebooks =item - C for viewing BitTorrent information =item - C or C for viewing information about media files =item - C for OpenDocument text files (odt, ods, odp and sxw) =item - C or C for JSON files =item - C for font previews =back =back Install these programs (just the ones you need) and scope.sh will automatically use them. Independently of the preview script, there is a feature to preview images by drawing them directly into the terminal. To enable this feature, set the option C to true and enable one of the image preview modes: =head3 iTerm2 This only works in iTerm2 compiled with image preview support, but works over ssh. To enable this feature, set the option C to iterm2. This feature relies on the dimensions of the terminal's font. By default, a width of 8 and height of 11 are used. To use other values, set the options C and C to the desired values. =head3 kitty This only works in Kitty. It requires PIL (or pillow) to work. Allows remote image previews, for example in an ssh session. To enable this feature, set the option C to kitty. =head3 terminology This only works in terminology. It can render vector graphics, but works only locally. To enable this feature, set the option C to terminology. =head3 ueberzug Überzug is a command line utility which draws images on terminals using child windows. It requires PIL (or pillow) and relies on X11. This makes it compatible (in a limited way, i.e., tmux splits are not supported) with many terminals and tmux but not the Linux console or Wayland. To enable this feature, set the option C to ueberzug. =head3 urxvt This only works in urxvt compiled with pixbuf support. Does not work over ssh. Essentially this mode sets an image as a terminal background temporarily, so it will break any previously set image background. To enable this feature, set the option C to urxvt. =head3 urxvt-full The same as urxvt but utilizing not only the preview pane but the whole terminal window. To enable this feature, set the option C to urxvt-full. =head3 w3m This does not work over ssh, requires certain terminals (tested on "xterm" and "urxvt") and is incompatible with tmux, although it works with screen. To enable this feature, install the program "w3m" and set the option C to w3m. When using a terminal with a nonzero border which is not automatically detected, the w3m preview will be misaligned. Use the C option to manually adjust the image offset. This should be the same value as the terminal's border value. =head2 SELECTION The I is defined as "All marked files IF THERE ARE ANY, otherwise the current file." Be aware of this when using the :delete command, which deletes all files in the selection. You can mark files by pressing , v, etc. A yellow B symbol at the bottom right indicates that there are marked files in this directory. =head2 MACROS Macros can be used in commands to abbreviate things. %f the highlighted file %d the path of the current directory %s the selected files in the current directory %t all tagged files in the current directory %c the full paths of the currently copied/cut files %p the full paths of selected files The macros %f, %d, %p, and %s also have upper case variants, %F, %D, %P, and %S, which refer to the next tab. To refer to specific tabs, add a number in between. (%7s = selection of the seventh tab.) %c is the only macro which ranges out of the current directory. So you may "abuse" the copying function for other purposes, like diffing two files which are in different directories: Yank the file A (type yy), move to the file B, then type @diff %c %f Macros for file paths are generally shell-escaped so they can be used in the C command. When mapping keys you can use the placeholder , the key entered in that position can be used through the %any and %any_path macros. (When using multiple placeholders you can index the macros: %any0, %any_path0, %any1, %any_path1...) The macro %any will be replaced with the key pressed in the position of the placeholder. The macro %any_path will be replaced with the path of the bookmark mapped to the key pressed in the position of the placeholder. For example this macro can be used to echo the key that was pressed after "c": map c echo %any %any is used in the ranger configuration to create a keybinding for adding a bookmark. c creates a bookmark for the current directory and the key for the bookmark is the first supplied argument. In this case the key pressed after "m": map m set_bookmark %any The %any_path macro can be used to echo the path of the bookmark that is set to the key pressed after "c": map c echo %any_path A practical example of the use of %any_path is the pasting of cut/copied files to a bookmarked directory: map p' paste dest=%any_path The macro %rangerdir expands to the directory of ranger's python library, you can use it for something like this command: alias show_commands shell less %rangerdir/config/commands.py %confdir expands to the directory given by B<--confdir>. %datadir expands to the directory given by B<--datadir>. The macro %space expands to a space character. You can use it to add spaces to the end of a command when needed, while preventing editors to strip spaces off the end of the line automatically. To write a literal %, you need to escape it by writing %%. Note that macros are expanded twice when using chain. For example, to insert a space character in a chained command, you would write %%space: chain command1; command2%%space =head2 BOOKMARKS Type B> to bookmark the current directory. You can re-enter this directory by typing B<`>. can be any letter or digit. Unlike vim, both lowercase and uppercase bookmarks are persistent. Each time you jump to a bookmark, the special bookmark at key ` will be set to the last directory. So typing "``" gets you back to where you were before. Bookmarks are selectable when tabbing in the :cd command. Note: The bookmarks ' (Apostrophe) and ` (Backtick) are the same. =head2 RIFLE Rifle is the file opener of ranger. It can be used as a standalone program or a python module. It is located at F<$repo/ranger/ext/rifle.py>. In contrast to other, more simple file openers, rifle can automatically find installed programs so it can be used effectively out of the box on a variety of systems. It's configured in F through a list of conditions and commands. For each line the conditions are checked and if they are met, the respective command is taken into consideration. By default, simply the first matching rule is used. In ranger, you can list and choose rules by typing "r" or simply by typing "". If you use rifle standalone, you can list all rules with the "-l" option and pick a rule with "-p ". The rules, along with further documentation, are contained in F<$repo/ranger/config/rifle.conf>. =head2 FLAGS Flags give you a way to modify the behavior of the spawned process. They are used in the commands C<:open_with> (key "r") and C<:shell> (key "!"). f Fork the process, i.e. run in background. Please use this flag instead of calling "disown" or "nohup", to avoid killing the background command when pressing Ctrl+C in ranger. c Run the current file only, instead of the selection r Run application with root privilege (requires sudo) t Run application in a new terminal window There are some additional flags that can currently be used only in the C command: (for example C<:shell -w df>) p Redirect output to the pager s Silent mode. Output will be discarded. w Wait for an Enter-press when the process is done By default, all the flags are off unless otherwise specified in F key bindings or F rules. You can specify as many flags as you want. An uppercase flag negates the effect: "ffcccFsf" is equivalent to "cs". The terminal program name for the "t" flag is taken from the environment variable $TERMCMD. If it doesn't exist, it tries to extract it from $TERM, uses "x-terminal-emulator" as a fallback, and then "xterm" if that fails. Examples: C<:open_with c> will open the file that you currently point at, even if you have selected other files. C<:shell -w df> will run "df" and wait for you to press Enter before switching back to ranger. =head2 PLUGINS ranger's plugin system consists of python files which are located in F<~/.config/ranger/plugins/> and are imported in alphabetical order when starting ranger. A plugin changes rangers behavior by overwriting or extending a function that ranger uses. This allows you to change pretty much every part of ranger, but there is no guarantee that things will continue to work in future versions as the source code evolves. Adding new commands via a plugin as simple as specifying them like you would do in the I. There are some hooks that are specifically made for the use in plugins. They are functions that start with hook_ and can be found throughout the code. grep 'def hook_' -r /path/to/rangers/source Also try: pydoc ranger.api Note that you should NOT simply overwrite a function unless you know what you're doing. Instead, save the existing function and call it from your new one. This way, multiple plugins can use the same hook. There are several sample plugins in the F directory, including a hello-world plugin that describes this procedure. =head1 KEY BINDINGS Key bindings are defined in the file F<%rangerdir/config/rc.conf>. Check this file for a list of all key bindings. You can copy it to your local configuration directory with the --copy-config=rc option. Many key bindings take an additional numeric argument. Type I<5j> to move down 5 lines, I<2l> to open a file in mode 2, I<10> to mark 10 files. This list contains the most useful bindings: =head2 MAIN BINDINGS =over 14 =item h, j, k, l Move left, down, up or right =item ^D or J, ^U or K Move a half page down, up =item H, L Move back and forward in the history =item gg Move to the top =item G Move to the bottom =item [, ] Move up and down in the parent directory. =item ^R Reload everything =item F Toggle I setting. When active (indicated by a cyan I message in the status bar), directories and files will not be loaded, improving performance when all the files you need are already loaded. This does not affect file previews, which can be toggled with I. Also try disabling the preview of directories with I. =item ^L Redraw the screen =item i Inspect the current file in a bigger window. =item E Edit the current file in $VISUAL otherwise $EDITOR otherwise "vim" =item S Open a shell in the current directory =item ? Opens this man page =item W Opens the log window where you can review messages that pop up at the bottom. =item w Opens the task window where you can view and modify background processes that currently run in ranger. In there, you can type "dd" to abort a process and "J" or "K" to change the priority of a process. Only one process is run at a time. =item ^C Stop the currently running background process that ranger has started, like copying files, loading directories or file previews. =item =, +, - Change the permissions of the selection. For example, C<777=> is equivalent to C, C<+ar> does C, C<-ow> does C etc. =item yy Copy (yank) the selection, like pressing Ctrl+C in modern GUI programs. (You can also type "ya" to add files to the copy buffer, "yr" to remove files again, or "yt" for toggling.) =item dd Cut the selection, like pressing Ctrl+X in modern GUI programs. (There are also "da", "dr" and "dt" shortcuts equivalent to "ya", "yr" and "yt".) =item pp Paste the files which were previously copied or cut, like pressing Ctrl+V in modern GUI programs. Conflicts will be renamed by appending an '_' (and a counter if necessary), resulting in C, C, etc. If you prefer C you can use the C command. =item po Paste the copied/cut files, overwriting existing files. =item pP, pO Like pp and po, but queues the operation so that it will be executed I any other operations. Reminder: type C to open the task window. =item pl, pL Create symlinks (absolute or relative) to the copied files =item phl Create hardlinks to the copied files =item pht Duplicate the subdirectory tree of the copied directory, then create hardlinks for each contained file into the new directory tree. =item mI Create a bookmark with the name I =item `I Move to the bookmark with the name I =item n Find the next file. By default, this gets you to the newest file in the directory, but if you search something using the keys /, cm, ct, ..., it will get you to the next found entry. =item N Find the previous file. =item oI Change the sort method (like in mutt) =item zI Change settings. See the settings section for a list of settings and their hotkey. =item uI Universal undo-key. Depending on the key that you press after "u", it either restores closed tabs (uq), removes tags (ut), clears the copy/cut buffer (ud), starts the reversed visual mode (uV) or clears the selection (uv). =item f Quickly navigate by entering a part of the filename. =item Space Mark a file. =item v Toggle the mark-status of all files =item V Starts the visual mode, which selects all files between the starting point and the cursor until you press ESC. To unselect files in the same way, use "uV". =item / Search for files in the current directory. =item : Open the console. =item ! Open the console with the content "shell " so you can quickly run commands =item @ Open the console with the content "shell %s", placing the cursor before the " %s" so you can quickly run commands with the current selection as the argument. =item r Open the console with the content "open with " so you can decide which program to use to open the current file selection. =item cd Open the console with the content "cd " =item ^P Open the console with the most recent command. =item Alt-I Open a tab. N has to be a number from 0 to 9. If the tab doesn't exist yet, it will be created. =item Alt-l, Alt-r Shift a tab left, respectively right. =item gn, ^N Create a new tab. =item gt, gT Go to the next or previous tab. You can also use TAB and SHIFT+TAB instead. =item gc, ^W Close the current tab. The last tab cannot be closed this way. =item M A key chain that allows you to quickly change the line mode of all the files of the current directory. For a more permanent solution, use the command "default_linemode" in your rc.conf. =item .d Apply the typefilter "directory". =item .f Apply the typefilter "file". =item .l Apply the typefilter "symlink". =item .m Apply a new mimetype filter. =item .n Apply a new filename filter. =item .# Apply a new hash filter. =item ." Apply a new duplicate filter. =item .' Apply a new unique filter. =item .| Combine the two topmost filters from the filter stack in the C relationship, instead of the C used implicitly. =item .& Explicitly combine the two topmost filters in the C relationship. Usually not needed because filters are implicitly in this relationship though might be useful in more complicated scenarios. =item .! Negate the topmost filter. =item .r Rotate the filter stack by N elements. Where N is provided as a numeric prefix like vim's I and defaults to 1, i.e. move the topmost element to the bottom of the stack. =item .c Clear the filter stack. =item .* Decompose the topmost filter combinator (e.g. C<.!>, C<.|>). =item .p Pop the topmost filter from the filter stack. =item .. Show the current filter stack state. =back =head2 READLINE-LIKE BINDINGS IN THE CONSOLE =over 14 =item ^B, ^F Move left and right (B for back, F for forward) =item ^P, ^N Move up and down (P for previous, N for Next) =item ^A, ^E Move to the start or to the end =item Alt-B, Alt-LEFT Move backwards by words. =item Alt-F, Alt-RIGHT Move forwards by words. =item ^D Delete the current character. =item ^H Backspace. =back =head1 MOUSE BUTTONS =over =item Left Mouse Button Click on something and you'll move there. To run a file, "enter" it, like a directory, by clicking on the preview. =item Right Mouse Button Enter a directory or run a file. =item Scroll Wheel Scrolls up or down. You can point at the column of the parent directory while scrolling to switch directories. =back =head1 SETTINGS This section lists all built-in settings of ranger. The valid types for the value are in [brackets]. The hotkey to toggle the setting is in , if a hotkey exists. Settings can be changed in the file F<~/.config/ranger/rc.conf> or on the fly with the command B<:set option value>. Examples: set column_ratios 1,2,3 set show_hidden true Toggling options can be done with: set show_hidden! The different types of settings and an example for each type: setting type | example values ---------------+---------------------------- bool | true, false integer | 1, 23, 1337 string | foo, hello world list | 1,2,3,4 none | none You can view a list of all settings and their current values by pressing "3?" in ranger. =over =item automatically_count_files [bool] Should ranger count and display the number of files in each directory as soon as it's visible? This gets slow with remote file systems. Turning it off will still allow you to see the number of files after entering the directory. =item autosave_bookmarks [bool] Save bookmarks (used with mX and `X) instantly? This helps to synchronize bookmarks between multiple ranger instances but leads to *slight* performance loss. When false, bookmarks are saved when ranger is exited. =item autoupdate_cumulative_size [bool] You can display the "real" cumulative size of directories by using the command :get_cumulative_size or typing "dc". The size is expensive to calculate and will not be updated automatically. You can choose to update it automatically though by turning on this option. =item cd_bookmarks [bool] Specify whether bookmarks should be included in the tab completion of the "cd" command. =item cd_tab_case [string] Changes case sensitivity for the "cd" command tab completion. Possible values are: sensitive insensitive smart =item cd_tab_fuzzy [bool] Use fuzzy tab completion with the "cd" command. For example, B<:cd /u/lo/b> expands to B<:cd /usr/local/bin>. =item clear_filters_on_dir_change [bool] If set to 'true', persistent filters would be cleared upon leaving the directory =item collapse_preview [bool] When no preview is visible, should the last column be squeezed to make use of the whitespace? =item colorscheme [string] Which colorscheme to use? These colorschemes are available by default: B, B, B. Snow is a monochrome scheme, jungle replaces blue directories with green ones for better visibility on certain terminals. =item column_ratios [list] How many columns are there, and what are their relative widths? For example, a value of 1,1,1 would mean 3 evenly sized columns. 1,1,1,1,4 means 5 columns with the preview column being as large as the other columns combined. =item confirm_on_delete [string] Ask for a confirmation when running the "delete" command? Valid values are "always" (default), "never", "multiple". With "multiple", ranger will ask only if you delete multiple files at once. =item dirname_in_tabs [bool] Display the directory name in tabs? =item display_size_in_main_column [bool] Display the file size in the main column? =item display_size_in_status_bar [bool] Display the file size in the status bar? =item display_free_space_in_status_bar [bool] Display the free disk space in the status bar? =item display_tags_in_all_columns [bool] Display tags in all columns? =item draw_borders [string] Draw borders around or between the columns? Possible values are: none no borders of any sort outline draw an outline around all the columns separators draw only vertical lines between columns both both of the above =item draw_progress_bar_in_status_bar [bool] Draw a progress bar in the status bar which displays the average state of all currently running tasks which support progress bars? =item flushinput [bool] Flush the input after each key hit? One advantage is that when scrolling down with "j", ranger stops scrolling instantly when you release the key. One disadvantage is that when you type commands blindly, some keys might get lost. =item freeze_files [bool] When active, directories and files will not be loaded, improving performance when all the files you need are already loaded. This does not affect file previews. =item global_inode_type_filter [string] Like filter_inode_type, but globally for all directories. Useful in combination with B<--choosedir>: ranger --choosedir=/tmp/x --cmd='set global_inode_type_filter d' =item hidden_filter [string] A regular expression pattern for files which should be hidden. For example, this pattern will hide all files that start with a dot or end with a tilde. set hidden_filter ^\.|~$ =item hint_collapse_threshold [int] The key hint lists up to this size have their sublists expanded. Otherwise the submaps are replaced with "...". =item hostname_in_titlebar [bool] Show hostname in titlebar? =item size_in_bytes [bool] Print file sizes in bytes instead of the default human-readable format. =item idle_delay [integer] The delay that ranger idly waits for user input, in milliseconds, with a resolution of 100ms. Lower delay reduces lag between directory updates but increases CPU load. =item iterm2_font_height [integer] Change the assumed font height in iTerm2, which may help with iTerm image previews =item iterm2_font_width [integer] Change the assumed font width in iTerm2, which may help with iTerm image previews =item line_numbers [string] Show line numbers in main column. Possible values are: false turn the feature off absolute absolute line numbers for use with "gg" relative relative line numbers for "k" or "j" =item max_console_history_size [integer, none] How many console commands should be kept in history? "none" will disable the limit. =item max_history_size [integer, none] How many directory changes should be kept in history? =item metadata_deep_search [bool] When the metadata manager module looks for metadata, should it only look for a ".metadata.json" file in the current directory, or do a deep search and check all directories above the current one as well? =item mouse_enabled [bool] Enable mouse input? =item nested_ranger_warning [string] Warn at startup if C is greater than 0, in other words give a warning when you nest ranger in a subshell started by ranger. Allowed values are C, C and C. The special value C promotes the warning to an error, this is usually shown as red text but will crash ranger when run with the C<--debug> flag. =item one_indexed [bool] Start line numbers from 1. Possible values are: false start line numbers from 0 true start line numbers from 1 =item open_all_images [bool] Open all images in this directory when running certain image viewers like feh or sxiv? You can still open selected files by marking them. If there would be too many files for the system to handle, this option will be temporarily disabled automatically. =item padding_right [bool] When collapse_preview is on and there is no preview, should there remain a little padding on the right? This allows you to click into that space to run the file. =item preview_directories [bool] Preview directories in the preview column? =item preview_files [bool] Preview files in the preview column? =item preview_images [bool] Draw images inside the console with the external program w3mimgpreview? =item preview_images_method [string] Set the preview image method. Supported methods: w3m, iterm2, urxvt, urxvt-full, terminology. See I section. =item preview_max_size [int] Avoid previewing files that exceed a certain size, in bytes. Use a value of 0 to disable this feature. =item preview_script [string, none] Which script should handle generating previews? If the file doesn't exist, or use_preview_script is off, ranger will handle previews itself by just printing the content. =item relative_current_zero [bool] When line_numbers is set to relative, show 0 on the current line if true or show the absolute number of the current line when false. =item save_backtick_bookmark [bool] Save the C<`> bookmark to disk. This bookmark is used to switch to the last directory by typing C<``>. =item save_console_history [bool] Should the console history be saved on exit? If disabled, the console history is reset when you restart ranger. =item save_tabs_on_exit [bool] Save all tabs, except the active, on exit? The last saved tabs are restored once when starting the next session. Multiple sessions are stored in a stack and the oldest saved tabs are restored first. =item scroll_offset [integer] Try to keep this much space between the top/bottom border when scrolling. =item shorten_title [integer] Trim the title of the window if it gets long? The number defines how many directories are displayed at once. A value of 0 turns off this feature. =item show_cursor [bool] Always show the terminal cursor? =item show_hidden_bookmarks [bool] Show dotfiles in the bookmark preview window? (Type ') =item show_hidden [bool] , <^H> Show hidden files? =item show_selection_in_titlebar [bool] Add the highlighted file to the path in the titlebar =item sort_case_insensitive [bool] Sort case-insensitively? If true, "a" will be listed before "B" even though its ASCII value is higher. =item sort_directories_first [bool] Sort directories first? =item sort_reverse [bool] Reverse the order of files? =item sort_unicode [bool] When sorting according to some string, should the unicode characters be compared, instead of looking at the raw character values to save time? =item sort [string] , , , , , , , , Which sorting mechanism should be used? Choose one of B, B, B, B, B, B, B, B, B Note: You can reverse the order by typing an uppercase second letter in the key combination, e.g. "oN" to sort from Z to A. =item status_bar_on_top [bool] Put the status bar at the top of the window? =item tilde_in_titlebar [bool] Abbreviate $HOME with ~ in the titlebar (first line) of ranger? =item unicode_ellipsis [bool] Use a unicode "..." character instead of "~" to mark cut-off filenames? =item bidi_support [bool] Try to properly display file names in RTL languages (Hebrew, Arabic) by using a BIDI algorithm to reverse the relevant parts of the text. Requires the python-bidi pip package. =item update_title [bool] Set a window title? Updates both the I and I properties. =item update_tmux_title [bool] Set the tmux/screen I to "ranger"? =item use_preview_script [bool] Use the preview script defined in the setting I? =item vcs_aware [bool] Gather and display data about version control systems. Supported vcs: git, hg. =item vcs_backend_git, vcs_backend_hg, vcs_backend_bzr, vcs_backend_svn [string] Sets the state for the version control backend. The possible values are: disabled Don't display any information. local Display only local state. enabled Display both, local and remote state. May be slow for hg and bzr. =item vcs_msg_length [int] Length to truncate first line of the commit messages to when shown in the statusbar. Defaults to 50. =item viewmode [string] Sets the view mode, which can be B to display the files in the traditional miller column view that shows multiple levels of the hierarchy, or B to use multiple panes (one per tab) similar to midnight-commander. =item w3m_delay [float] Delay in seconds before displaying an image with the w3m method. Increase it in case of experiencing display corruption. =item w3m_offset [int] Offset in pixels for the inner border of the terminal. Some terminals require the offset to be specified explicitly, among others st and UXterm, some don't like urxvt. =item wrap_plaintext_previews [bool] Whether or not to wrap long lines in the pager, this includes previews of plain text files. =item wrap_scroll [bool] Enable scroll wrapping - moving down while on the last item will wrap around to the top and vice versa. =item xterm_alt_key [bool] Enable this if key combinations with the Alt Key don't work for you. (Especially on xterm) =back =head1 COMMANDS You can enter the commands in the console which is opened by pressing ":". You can always get a list of the currently existing commands by typing "?c" in ranger. For your convenience, this is a list of the "public" commands including their parameters, excluding descriptions: alias [newcommand] [oldcommand] bulkrename cd [path] chain command1[; command2[; command3...]] chmod octal_number cmap key command console [-pSTARTPOSITION] command copycmap key newkey [newkey2...] copymap key newkey [newkey2...] copypmap key newkey [newkey2...] copytmap key newkey [newkey2...] cunmap keys... default_linemode [path=regexp | tag=tags] linemodename delete echo [text] edit [filename] eval [-q] python_code filter [string] filter_inode_type [dfl] find pattern flat level grep pattern help jump_non [-FLAGS...] linemode linemodename load_copy_buffer map key command mark pattern mark_tag [tags] meta key value mkdir dirname open_with [application] [flags] [mode] pmap key command prompt_metadata [key1 [key2 [...]]] punmap keys... quit quit! quitall quitall! relink newpath rename_append [-FLAGS...] rename newname save_copy_buffer scout [-FLAGS...] pattern search pattern search_inc pattern set option value setintag tags option value setlocal [path=] option value shell [-FLAGS...] command source filename terminal tmap key command touch filename trash travel pattern tunmap keys... unmap keys... unmark pattern unmark_tag [tags] There are additional commands which are directly translated to python functions, one for every method in the ranger.core.actions.Actions class. They are not documented here, since they are mostly for key bindings, not to be typed in by a user. Read the source if you are interested in them. These are the public commands including their descriptions: =over 2 =item alias [I] [I] Copies the oldcommand as newcommand. =item bulkrename This command opens a list of selected files in an external editor. After you edit and save the file, it will generate a shell script which does bulk renaming according to the changes you did in the file. This shell script is opened in an editor for you to review. After you close it, it will be executed. =item cd [I] The cd command changes the directory. If path is a file, selects that file. The command C<:cd -> is equivalent to typing ``. =item chain I[; I[; I...]] Combines multiple commands into one, separated by semicolons. =item chmod I Sets the permissions of the selection to the octal number. The octal number is between 000 and 777. The digits specify the permissions for the user, the group and others. A 1 permits execution, a 2 permits writing, a 4 permits reading. Add those numbers to combine them. So a 7 permits everything. Key bindings in the form of [-+] and = also exist. For example, B<+ar> allows reading for everyone, -ow forbids others to write and 777= allows everything. See also: man 1 chmod =item console [-pI] I Opens the console with the command already typed in. The cursor is placed at I. =item copymap I I [I ...] =item copycmap I I [I ...] =item copypmap I I [I ...] =item copytmap I I [I ...] Copies the keybinding I to I in the "browser" context. This is a deep copy, so if you change the new binding (or parts of it) later, the old one is not modified. For example, I will make the key sequence "down" move the cursor down one item. To copy key bindings of the console, pager or taskview use "copycmap", "copypmap" or "copytmap" respectively. =item default_linemode [I | I] I Sets the default linemode. See I command. Examples: Set the global default linemode to "permissions": :default_linemode permissions Set the default linemode to "permissions" for all files tagged with "p" or "P": :default_linemode tag=pP permissions Set the default linemode for all files in ~/books/ to "metatitle": :default_linemode path=/home/.*?/books/.* metatitle =item delete Destroy all files in the selection with a roundhouse kick. ranger will ask for a confirmation if you attempt to delete multiple (marked) files or non-empty directories. This can be changed by modifying the setting "confirm_on_delete". =item echo I Display the text in the statusbar. =item edit [I] Edit the current file or the file in the argument. =item eval [I<-q>] I Evaluates the python code. `fm' is a reference to the FM instance. To display text, use the function `p'. The result is displayed on the screen unless you use the "-q" option. Examples: :eval fm :eval len(fm.tabs) :eval p("Hello World!") =item filter [I] Displays only the files which contain the I in their basename. Running this command without any parameter will reset the filter. This command is based on the I command and supports all of its options. =item filter_inode_type [dfl] Displays only the files of specified inode type. To display only directories, use the 'd' parameter. To display only files, use the 'f' parameter. To display only links, use the 'l' parameter. Parameters can be combined. To remove this filter, use no parameter. =item filter_stack [I [I]] Manage the filter stack, adding, removing and manipulating filters. For example, to show only duplicate files and symlinks: :filter_stack add type f :filter_stack add duplicate :filter_stack add and :filter_stack add type l :filter_stack add or Or using the mapped keys: .f ." .& .l .| Available subcommands: =over 2 =item add FILTER_TYPE [ARGS...] Add a new filter to the top of the filter stack. Each filter on the stack is applied in turn, resulting in an implicit logical C relation. The following Cs are available: =over 2 =item duplicate Filter files so only files that have duplicates in the same directory are shown. Useful when cleaning up identical songs and memes that were saved using distinct file names. =item filename NAME Filter files that contain NAME in the filename, regular expression syntax is allowed. =item hash PATH Filter files so only files with the same hash as PATH are shown. =item mimetype TYPE Filter files of a certain MIME type, regular expression syntax is allowed. =item typefilter [d|f|l] Filter files of a certain type, C for directories, C for files and C for symlinks. =item unique Filter files so only unique files and the oldest file of every set of duplicates is shown. =item and Explicitly combine the two topmost filters in the "AND" relationship. Usually not needed because filters are implicitly in this relationship though might be useful in more complicated scenarios. =item not Negate the topmost filter. =item or Combine the two topmost filters from the filter stack in the "OR" relationship, instead of the "AND" used implicitly. =back =item pop Pop the topmost filter from the filter stack. =item decompose Decompose the topmost filter combinator (e.g. C<.!>, C<.|>). =item rotate [N=1] Rotate the filter stack by N elements. Where N is passed as argument or as a numeric prefix like vim's I, default to 1, i.e. move the topmost element to the bottom of the stack. =item clear Clear the filter stack. =item show Show the current filter stack state. =back =item find I Search files in the current directory that contain the given (case-insensitive) string in their name as you type. Once there is an unambiguous result, it will be run immediately. (Or entered, if it's a directory.) This command is based on the I command and supports all of its options. =item flat level Flattens the directory view up to the specified level. Level -1 means infinite level. Level 0 means standard view without flattened directory view. Level values -2 and less are invalid. =item grep I Looks for a string in all marked files or directories. =item help Provides a quick way to view ranger documentations. =item jump_non [-I...] Jumps to first non-directory if highlighted file is a directory and vice versa. Flags: -r Jump in reverse order -w Wrap around if reaching end of filelist =item linemode I Sets the linemode of all files in the current directory. The linemode may be: "filename": display each line as "..." "fileinfo": display each line as "..." "mtime": display each line as "..." in ISO format "humanreadablemtime": display each line as "..." in a human readable format, more precise the more recent. "sizemtime": display each line as "... " in ISO format "humanreadablesizemtime": display each line as "... " in a human readable format, more precise the more recent. "permissions": display each line as " " "metatitle": display metadata from .metadata.json files if available, fall back to the "filename" linemode if no metadata was found. See :meta command. The custom linemodes may be added by subclassing the I class. See the I module for some examples. =item load_copy_buffer Load the copy buffer from F<~/.config/ranger/copy_buffer>. This can be used to pass the list of copied files to another ranger instance. =item map I I =item cmap I I =item pmap I I =item tmap I I Assign the key combination to the given command. Whenever you type the key/keys, the command will be executed. Additionally, if you use a quantifier when typing the key, like 5j, it will be passed to the command as the attribute "self.quantifier". The keys you bind with this command are accessible in the file browser only, not in the console, pager or taskview. To bind keys there, use the commands "cmap", "pmap" or "tmap". =item mark I Mark all files matching the regular expression pattern. This command is based on the I command and supports all of its options. =item mark_tag [I] Mark all tags that are tagged with either of the given tags. When leaving out the tag argument, all tagged files are marked. =item meta I I Set the metadata of the currently highlighted file. Example: :meta title The Hitchhiker's Guide to the Galaxy :meta year 1979 This metadata can be displayed by, for example, using the "metatitle" line mode by typing Mt. =item mkdir I Creates a directory with the name I. =item open_with [I] [I] [I] Open the selected files with the given application, unless it is omitted, in which case the default application is used. I change the way the application is executed and are described in their own section in this man page. The I is a number that specifies which application to use. The list of applications is generated by the external file opener "rifle" and can be displayed when pressing "r" in ranger. Note that if you specify an application, the mode is ignored. =item prompt_metadata [I] Prompt the user to input metadata with the C command for multiple keys in a row. =item quit Closes the current tab, if there's only one tab. Otherwise quits if there are no tasks in progress. The current directory will be bookmarked as ' so you can re-enter it by typing `` or '' the next time you start ranger. =item quit! Like C, except will force quit even if tasks are in progress. =item quitall Like C, except will quit even if multiple tabs are open. =item quitall! Like C, except will force quit even if tasks are in progress. =item relink I Change the link destination of the current symlink file to . First will load the original link. =item rename I Rename the current file. If a file with that name already exists, the renaming will fail. Also try the key binding A for appending something to a file name. =item rename_append [-I...] Opens the console with ":rename " with the cursor positioned before the file extension. Flags: -a Position before all extensions -r Remove everything before extensions =item save_copy_buffer Save the copy buffer to I<~/.config/ranger/copy_buffer>. This can be used to pass the list of copied files to another ranger instance. =item scout [-I...] [--] I Swiss army knife command for searching, traveling and filtering files. Flags: -a Automatically open a file on unambiguous match -e Open the selected file when pressing enter -f Filter files that match the current search pattern -g Interpret pattern as a glob pattern -i Ignore the letter case of the files -k Keep the console open when changing a directory with the command -l Letter skipping; e.g. allow "rdme" to match the file "readme" -m Mark the matching files after pressing enter -M Unmark the matching files after pressing enter -p Permanent filter: hide non-matching files after pressing enter -r Interpret pattern as a regular expression pattern -s Smart case; like -i unless pattern contains upper case letters -t Apply filter and search pattern as you type -v Inverts the match Multiple flags can be combined. For example, ":scout -gpt" would create a :filter-like command using globbing. =item search I Search files in the current directory that match the given (case insensitive) regular expression pattern. This command is based on the I command and supports all of its options. =item search_inc I Search files in the current directory that match the given (case insensitive) regular expression pattern. This command gets you to matching files as you type. This command is based on the I command and supports all of its options. =item set I