Start work on porting diff kitten

This commit is contained in:
Kovid Goyal
2023-03-15 15:32:55 +05:30
parent cb03168957
commit 44ff6bd1dd
5 changed files with 27 additions and 3 deletions

View File

@@ -708,6 +708,7 @@ elif __name__ == '__doc__':
cd['usage'] = usage
cd['options'] = OPTIONS
cd['help_text'] = help_text
cd['short_desc'] = 'Pretty, side-by-side diffing of files and images'
cd['args_completion'] = CompletionSpec.from_string('type:file mime:text/* mime:image/* group:"Text and image files"')
elif __name__ == '__conf__':
from .options.definition import definition

View File

@@ -21,10 +21,11 @@ mma = definition.add_mouse_map
agr('diff', 'Diffing')
opt('syntax_aliases', 'pyj:py pyi:py recipe:py',
option_type='syntax_aliases',
option_type='syntax_aliases', ctype='strdict_ _:',
long_text='''
File extension aliases for syntax highlight. For example, to syntax highlight
:file:`file.xyz` as :file:`file.abc` use a setting of :code:`xyz:abc`.
Multiple aliases must be separated by spaces.
'''
)
@@ -47,7 +48,7 @@ opt('replace_tab_by', '\\x20\\x20\\x20\\x20',
long_text='The string to replace tabs with. Default is to use four spaces.'
)
opt('+ignore_name', '',
opt('+ignore_name', '', ctype='string',
option_type='store_multiple',
add_to_default=False,
long_text='''