Start work on porting diff kitten
This commit is contained in:
parent
cb03168957
commit
44ff6bd1dd
@ -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
|
||||
|
||||
@ -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='''
|
||||
|
||||
@ -24,7 +24,7 @@ exec_kitty() {
|
||||
|
||||
|
||||
is_wrapped_kitten() {
|
||||
wrapped_kittens="clipboard icat hyperlinked_grep ask hints unicode_input ssh themes"
|
||||
wrapped_kittens="clipboard icat hyperlinked_grep ask hints unicode_input ssh themes diff"
|
||||
[ -n "$1" ] && {
|
||||
case " $wrapped_kittens " in
|
||||
*" $1 "*) printf "%s" "$1" ;;
|
||||
|
||||
19
tools/cmd/diff/main.go
Normal file
19
tools/cmd/diff/main.go
Normal file
@ -0,0 +1,19 @@
|
||||
// License: GPLv3 Copyright: 2023, Kovid Goyal, <kovid at kovidgoyal.net>
|
||||
|
||||
package diff
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"kitty/tools/cli"
|
||||
)
|
||||
|
||||
var _ = fmt.Print
|
||||
|
||||
func main(_ *cli.Command, opts *Options, args []string) (rc int, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func EntryPoint(parent *cli.Command) {
|
||||
create_cmd(parent, main)
|
||||
}
|
||||
@ -9,6 +9,7 @@ import (
|
||||
"kitty/tools/cmd/ask"
|
||||
"kitty/tools/cmd/at"
|
||||
"kitty/tools/cmd/clipboard"
|
||||
"kitty/tools/cmd/diff"
|
||||
"kitty/tools/cmd/edit_in_kitty"
|
||||
"kitty/tools/cmd/hints"
|
||||
"kitty/tools/cmd/hyperlinked_grep"
|
||||
@ -46,6 +47,8 @@ func KittyToolEntryPoints(root *cli.Command) {
|
||||
ask.EntryPoint(root)
|
||||
// hints
|
||||
hints.EntryPoint(root)
|
||||
// hints
|
||||
diff.EntryPoint(root)
|
||||
// themes
|
||||
themes.EntryPoint(root)
|
||||
// __pytest__
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user