about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* Document expected failure of GH Actiontoonn2020-07-051-1/+1
| | | | | | | 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.
* Clarify excluded tests for github workflowtoonn2020-07-052-3/+3
| | | | | Add pytest to the failing workflow because otherwise it's not run with python 2.7.
* Possible bug caught in reviewtoonn2020-07-053-5/+9
| | | | | | | Forgot to cast the `programs` generator to a list when dropping the unnecessary continuation. Miscellaneous alignment fixes.
* Drop explicit return Nonetoonn2020-07-051-1/+0
|
* Use chained comparison instead of multiple clausestoonn2020-07-054-9/+9
|
* Adjust comment indentationtoonn2020-07-051-7/+7
|
* Drop unnecessary if-expressionstoonn2020-07-053-5/+6
|
* Use in instead of multiple equality clausestoonn2020-07-052-6/+6
|
* Drop unnecessary comprehensionstoonn2020-07-052-7/+3
| | | | | It's unclear why these comprehensions were used, maybe as a way of cloning the lists? However, this does not seem necessary.
* Drop redundant try-excepttoonn2020-07-051-4/+2
|
* Switch to testing after lower casing for consistencytoonn2020-07-051-2/+2
|
* Drop redundant pass statementstoonn2020-07-053-11/+0
| | | | | Because of the docstrings the function bodies aren't empty and pass is not required.
* Add local pylint disablestoonn2020-07-053-2/+4
|
* Disable dict-comprehension suggestiontoonn2020-07-051-0/+2
| | | | | Dict comprehensions were add in 2.7 so we can't use them for COMPAT reasons.
* Disable spurious warning, name is obviously passedtoonn2020-07-051-0/+1
|
* Replace if statement with dict.get with defaulttoonn2020-07-051-8/+2
|
* Add global Pylint ignorestoonn2020-07-052-2/+2
| | | | | | | | | | `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.
* Prepare for Pylint transition from versions <2toonn2020-07-055-40/+17
|
* Merge branch 'touch-recursive'toonn2020-07-051-1/+5
|\
| * :touch create missing directoriestoonn2020-06-161-1/+5
| | | | | | | | | | | | | | | | `: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
* | Merge branch 'color-line-numbers'toonn2020-07-055-5/+16
|\ \
| * | Implement a line_number context for colorschemestoonn2020-04-095-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge branch 'py-version-checks'toonn2020-07-0513-37/+34
|\ \ \
| * | | Factor out python 3 version checkingtoonn2020-06-2912-37/+34
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Factor PY3 constant out into ranger moduletoonn2020-06-293-5/+5
| | | |
* | | | Merge branch 'rc_macro_error'toonn2020-07-052-68/+121
|\ \ \ \
| * | | | Add MacroDicttoonn2019-09-272-67/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Catch exceptions when resolving macros in rc.conftoonn2019-07-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | While parsing the settings in `rc.conf` `self.fm.thisfile` doesn't exist yet.
* | | | | Merge pull request #1816 from toonn/gifehfehWojciech Siewierski2020-07-051-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Feh does not handle animated gifs gracefully
| * | | | | Feh does not handle animated gifs gracefullytoonn2020-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #1814
* | | | | | Merge pull request #1847 from toonn/rust-is-textWojciech Siewierski2020-07-051-5/+5
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add rust to programming languages for rifle
| * | | | | | Add rust to programming languages for rifletoonn2020-02-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* | | | | | | Merge branch 'cache-hash' [#2019]Wojciech Siewierski2020-07-051-11/+9
|\ \ \ \ \ \ \
| * | | | | | | Switch from SHA-1 to SHA-512 for the cachetoonn2020-06-291-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | Get rid of redundant codetoonn2020-06-291-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | Drop file path from cache hashtoonn2020-06-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | Include mtime in hash rather than comparingtoonn2020-06-291-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | Allow equal mtime for cached previewstoonn2020-02-121-1/+1
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the use of symlinks to prevent copying files to the cache. Fixes #1837
* | | | | | | Merge pull request #1824 from toonn/pprime-draw-bookmarksWojciech Siewierski2020-07-051-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Add bookmark drawing to the paste to bookmark map
| * \ \ \ \ \ \ Merge branch 'master' into pprime-draw-bookmarksWojciech Siewierski2020-07-0510-71/+80
| |\ \ \ \ \ \ \ | | | |_|_|/ / / | | |/| | | | |
| * | | | | | | Add bookmark drawing to the paste to bookmark maptoonn2020-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | Merge pull request #1870 from toonn/py26-format-fixWojciech Siewierski2020-07-055-19/+25
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Py26 does not support implicit format spec numbering
| * \ \ \ \ \ \ \ Merge branch 'master' into py26-format-fixWojciech Siewierski2020-07-052-3/+13
| |\ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | |
* | | | | | | | | Merge pull request #1961 from toonn/pass-fileWojciech Siewierski2020-07-051-2/+6
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Revert "Revert "ranger <path> can select files""
| * \ \ \ \ \ \ \ \ Merge branch 'master' into pass-fileWojciech Siewierski2020-07-052-3/+3
| |\ \ \ \ \ \ \ \ \ | | | |_|/ / / / / / | | |/| | | | | | |
| * | | | | | | | | Revert "Revert "ranger <path> can select files""toonn2020-05-191-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | | | Merge pull request #2013 from toonn/silence-bulkrenameWojciech Siewierski2020-07-051-1/+7
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | | Implement passing of flags for :bulkrename
| * | | | | | | | | Implement passing of flags for :bulkrenametoonn2020-06-231-1/+7
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | | | | | Merge branch 'master' into py26-format-fixWojciech Siewierski2020-07-055-56/+63
| | |\ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | |
* | | | | | | | | Merge branch 'install-default-py3'toonn2020-06-221-2/+2
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|/ |/| | | | | | | |
>2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406