This log documents changes between stable versions. # 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 title bar 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 det
#!/usr/bin/python -O
# coding=utf-8
#
# Ranger: Explore your forest of files from inside your terminal
# Copyright (C) 2009, 2010  Roman Zimbelmann <romanz@lavabit.com>
#
# 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 <http://www.gnu.org/licenses/>.
#
# ----------------------------------------------------------------------------
#
# An embedded shell script. It allows you to change the directory
# after you exit ranger by starting it with: source ranger ranger
"""":
if [ $1 ]; then
	$@ --fail-if-run && cd "$(grep \^\' ~/.ranger/bookmarks | cut -b3-)"
else
	echo "usage: source path/to/ranger.py path/to/ranger.py"
fi
return 1
"""

# Redefine the docstring, since the previous one was hijacked to
# embed a shellscript.
__doc__ = """Ranger - file browser for the unix terminal"""

# Importing the main method may fail if the ranger directory
# is neither in the same directory as this file, nor in one of
# pythons global import paths.
try:
	from ranger.__main__ import main
except ImportError:
	import sys
	if '-d' not in