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:
6
kittens/diff/options/utils.py
Normal file → Executable file
6
kittens/diff/options/utils.py
Normal file → Executable file
@@ -3,7 +3,7 @@
|
||||
# License: GPLv3 Copyright: 2021, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
|
||||
from typing import Any, Dict, Iterable, Tuple, Union
|
||||
from typing import Any, Dict, Iterable, List, Tuple, Union
|
||||
|
||||
from kitty.conf.utils import (
|
||||
KeyFuncWrapper, KittensKeyDefinition, parse_kittens_key
|
||||
@@ -58,6 +58,10 @@ def syntax_aliases(raw: str) -> Dict[str, str]:
|
||||
return ans
|
||||
|
||||
|
||||
def pattern_list(raw: str) -> List[str]:
|
||||
return [pat for pat in raw.split(' ') if pat]
|
||||
|
||||
|
||||
def parse_map(val: str) -> Iterable[KittensKeyDefinition]:
|
||||
x = parse_kittens_key(val, func_with_args.args_funcs)
|
||||
if x is not None:
|
||||
|
||||
Reference in New Issue
Block a user