| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
One lacking `from __future__ import absolute_import` and one
implicit-format-spec (a custom check!) : )
|
|
|
|
|
|
|
|
|
| |
We have been stuck on pylint <2 for a long time now because it dropped
some of the python 2 lints we rely on. We maintain compatibility with
python 2.6+ and 3.5+ and a lack of lints makes especially the former
much harder. Incompatibilities had already snuck in in the form of
implicit format specs. By implementing a custom checker we can make sure
this doesn't happen again.
|
|
|
|
|
|
|
| |
Github Actions don't support some of our tests, due to `ncurses`.
This Action fails intentionally so it might get fixed once we figure it
out. If we invert the failure condition to "make CI green" we might
forget about it.
|
|
|
|
|
| |
Add pytest to the failing workflow because otherwise it's not run with
python 2.7.
|
|
|
|
|
|
|
| |
Forgot to cast the `programs` generator to a list when dropping the
unnecessary continuation.
Miscellaneous alignment fixes.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
It's unclear why these comprehensions were used, maybe as a way of
cloning the lists? However, this does not seem necessary.
|
| |
|
| |
|
|
|
|
|
| |
Because of the docstrings the function bodies aren't empty and pass is
not required.
|
| |
|
|
|
|
|
| |
Dict comprehensions were add in 2.7 so we can't use them for COMPAT
reasons.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
`no-else-break/continue/raise/return` because they're nonsense and
result in actively less readable code.
`useless-object-inheritance` because that's a py3-ism.
`import-outside-toplevel` because we use this in many places to good
effect.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
`:mkdir` creates directories recursively like `mkdir -p`.
`:touch` failed when parent directories didn't exist, for convenience
and consistency it now creates missing directories recursively.
Fixes #1998
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Changes the default color for line numbers to differ from the file's
color to the terminal's base foreground color in the default theme.
Green in the jungle theme and bold and/or bright in the snow theme.
Fixes #1906
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We check whether we're running python 2 or 3 in many places. In some
places we do more specific version checks but with the new `PY3`
constant modeled after `six` this code should be slightly more readable.
|
| | | | |
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Macros are resolved for set commands. A contributor wanted to add a
setting for a date format string to be used in ranger's status bar. The
string they tried happened to include `%d` which is a valid ranger macro
for the name of `thisdir`. This attribute is not yet defined when ranger
is reading `rc.conf` and this uncaught exception would crash ranger.
To work around this we need to catch `AttributeError`s for values that
might not exist yet. To avoid the repetition that'd come with all these
try-catch statements that behavior has been encapsulated in a new
MacroDict. This is almost as easy to use as the regular python
dictionary used previously. The only difference being that we need to
wrap values that might cause problems in a python `lambda`, though it
doesn't do any harm to wrap values that can't raise exceptions.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
While parsing the settings in `rc.conf` `self.fm.thisfile` doesn't exist
yet.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Feh does not handle animated gifs gracefully
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fixes #1814
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add rust to programming languages for rifle
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Add the Rust extension `.rs` to the list of programming languages to
match editor and pager because it is erroneously guessed as being
`application/rls-services+xml`.
|
|\ \ \ \ \ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The performance hit is negligible. File name lengths are usually 255
bytes at minimum (except for FAT, but a SHA-1 digest is truncated too).
An attack on the ranger cache based on hash collisions is probably
fairly unlikely but preventing it is almost free.
This should be merged soon after #1838 because both these PRs change the
cache hashes and can therefore cause generation of previews that have
been cached before, wasting some disk space.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The python version dependence is gone because we no longer want to hash
the path.
We've been doubling up `os.path.join` calls for a long time, that's
silly, let's just not.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Because we include the device identifier and the inode in cache hashes
now we no longer need the path to the file. Files are already more
uniquely identified (if the path was reused for another file with an
acceptable mtime there used to be a collision).
A small benefit is that hardlinked and symlinked files should now only
require a single cached preview.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Comparing the mtimes of a file and a cached preview or including the
mtime in the preview's hash are almost equivalent except this way we
don't need to find out the preview's mtime.
We include the device identifier and the inode in the hash, this makes
sure duplicate filenames don't cause erroneous hits in the cache.
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This allows the use of symlinks to prevent copying files to the cache.
Fixes #1837
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Add bookmark drawing to the paste to bookmark map
|
| |\ \ \ \ \ \ \
| | | |_|_|/ / /
| | |/| | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Neglected to add drawing of bookmarks to the mapping that allows pasting
the contents of the copybuffer to a bookmark's path.
Brought to my attention by discussion in #1277.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Py26 does not support implicit format spec numbering
|
| |\ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Revert "Revert "ranger <path> can select files""
|
| |\ \ \ \ \ \ \ \ \
| | | |_|/ / / / / /
| | |/| | | | | | | |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
I can't reproduce the problems with <Right> and I don't see anything in
the commit that could've caused them in the first place tbh. The issue
this introduces keeps coming up so I'm verting the original change.
Fixes #1655
Fixes #1386
This reverts commit 11549e2c0c73a8a0bb543801af4e134b3e076095.
|
|\ \ \ \ \ \ \ \ \ \
| |_|/ / / / / / / /
|/| | | | | | | | | |
Implement passing of flags for :bulkrename
|
|/ / / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The flags a bulkrename command passed to the command runner were fixed
to `w`, which means "wait for an enter keypress." Now it's possible to
pass whichever flags you want. Passing any flag overrides the default so
if you still want the confirmation you need to explicitly pass `w`.
Fixes #2002
|