mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 05:54:59 +02:00
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
This commit is contained in:
2
kittens/diff/main.py
Normal file → Executable file
2
kittens/diff/main.py
Normal file → Executable file
@@ -655,6 +655,8 @@ def main(args: List[str]) -> None:
|
||||
opts = init_config(cli_opts)
|
||||
set_diff_command(opts.diff_cmd)
|
||||
lines_for_path.replace_tab_by = opts.replace_tab_by
|
||||
Collection.file_ignores = opts.file_ignores
|
||||
Collection.ignore_paths = opts.ignore_paths
|
||||
left, right = map(get_remote_file, (left, right))
|
||||
if os.path.isdir(left) != os.path.isdir(right):
|
||||
raise SystemExit('The items to be diffed should both be either directories or files. Comparing a directory to a file is not valid.')
|
||||
|
||||
Reference in New Issue
Block a user