32 Commits

Author SHA1 Message Date
Suvayu Ali
20b6a97159 Update in response to feedback
- one configuration option: ignore_paths
- use shlex to parse option to support whitespace and in-line comments
- change option type to Tuple[str, ...]
- remove ignored directories from dirnames to prevent scanning
2022-06-06 11:00:45 +02:00
Suvayu Ali
eea652f1d0 kittens/diff: move empty pattern check to dir tree walk 2022-06-05 10:11:21 +02:00
Suvayu Ali
fbf1ec43c7 diff kitten: add options to ignore paths when comparing directories
Tested locally & over SSH:

    $ kitty +kitten diff /local/path /local/path2
    $ kitty +kitten diff /local/path ssh:remote:/path
2022-06-05 00:11:30 +02:00
pagedown
4a3ed62809
Refactor: More f-string for kittens 2022-01-29 20:23:34 +08:00
pagedown
dc61adf9d8
Refactor: More f-string 2022-01-28 19:34:13 +08:00
Kovid Goyal
6546c1da9b
run pyupgrade to upgrade the codebase to python3.6 2021-10-21 12:43:55 +05:30
Kovid Goyal
d052b020fa
Check for dirs when getting mimetypes in a couple more places 2021-07-16 21:49:02 +05:30
Kovid Goyal
df89266c03
diff kitten: Implement recursive diff over SSH
Fixes #3268
2021-01-28 14:23:56 +05:30
Kovid Goyal
75a94bcd96
Improving MIME type detection for some common file types when they are missing from the system MIME database
Also allow the user to specify their own database via mime.types in the
kitty config directory. See #3056
2020-10-25 13:42:11 +05:30
Kovid Goyal
efca2658ea
Fix typing issues pointed out by updated mypy 2020-10-12 23:03:07 +05:30
Kovid Goyal
2ebdf738ca
more typing work 2020-03-11 20:08:16 +05:30
Kovid Goyal
afec07b124
More typing work 2020-03-06 14:19:46 +05:30
Kovid Goyal
36eb52424f
No top level typing issues for kittens 2020-03-04 07:49:28 +05:30
Kovid Goyal
d6d01102fe
diff kitten: Fix directory diffing with removed binary files failing
Fixes #2378
2020-02-19 19:53:19 +05:30
Luflosi
2b095f720e
Use "with suppress()" to suppress python exceptions
Using
```Python
with suppress(OSError):
    os.remove('somefile.tmp')
```
instead of
```Python
try:
    os.remove('somefile.tmp')
except OSError:
    pass
```
makes the code more compact and more readable IMO.

This pattern was recommended by Raymond Hettinger, a Python Core
Developer in his talk "Transforming Code into Beautiful, Idiomatic Python" at https://www.youtube.com/watch?v=OSGv2VnC0go. The transcript is available at https://github.com/JeffPaine/beautiful_idiomatic_python
2019-06-03 12:27:43 +02:00
Luflosi
a792c94ccf
Use python3 shebang for all python scripts
Fixes #1624.
Use python3 shebang for all python scripts as python still defaults to python2 on many systems.
2019-05-20 14:44:24 +02:00
Kovid Goyal
22cffef7c8
diff kitten: Use a single-width replacement for control chars
Preserves text width better, and conveys the essential message, namely
non-printable characters. Most people wont know what <hex code> is in
any case.
2018-06-15 08:08:21 +05:30
Kovid Goyal
5dfb8b1d80
diff kitten: Display CRLF line endings using the unicode return symbol instead of <d> as it is less intrusive.
Fixes #638
2018-06-15 07:08:57 +05:30
Kovid Goyal
912b395316
diff kitten: Render tabs as four spaces instead of <9> 2018-05-20 15:29:12 +05:30
Kovid Goyal
fa3e173c18
diff kitten: Report errors converting images 2018-05-20 15:01:25 +05:30
Kovid Goyal
9cab8a2de5
diff kitten: Do not specify the default foreground color in formatting codes.
Fixes an issue with foreground color being incorrect after a highlighted
segment if the syntax highlight does not specify a foreground color at
the boundary.
2018-05-20 08:51:41 +05:30
Kovid Goyal
6020aadbf2
diff kitten: Show overall diff stats 2018-05-18 14:19:25 +05:30
Kovid Goyal
b9fa8dbe42
DRYer 2018-05-09 09:28:38 +05:30
Kovid Goyal
3820c46801
Ensure there is a blank line before each new item 2018-05-09 08:33:24 +05:30
Kovid Goyal
7365ed9b05
diff: Better title rendering 2018-05-08 23:02:00 +05:30
Kovid Goyal
96793a296c
diff kitten has working syntax highlighting 2018-05-08 14:48:01 +05:30
Kovid Goyal
09a3a3dafb
More work on the diff kitten 2018-05-08 08:43:41 +05:30
Kovid Goyal
67379c67cc
More work on the diff kitten 2018-05-05 13:38:28 +05:30
Kovid Goyal
f5c713b118
More work on the diff kitten 2018-05-05 09:45:35 +05:30
Kovid Goyal
d54b58d2f3
... 2018-04-25 19:50:40 +05:30
Kovid Goyal
6929358976
More work on the diff kitten 2018-04-21 15:45:16 +05:30
Kovid Goyal
0a8dc4be0a
Start work on the diff kitten 2018-04-17 17:43:56 +05:30