DRYer
This commit is contained in:
parent
6a23b4ee47
commit
7780d52930
@ -21,15 +21,15 @@ def remote_control(args):
|
|||||||
|
|
||||||
|
|
||||||
def namespaced(args):
|
def namespaced(args):
|
||||||
func = namespaced_entry_points[args[0]]
|
func = namespaced_entry_points[args[1]]
|
||||||
func(args[1:])
|
func(args[1:])
|
||||||
|
|
||||||
|
|
||||||
entry_points = {
|
entry_points = {
|
||||||
|
# These two are here for backwards compat
|
||||||
'icat': icat,
|
'icat': icat,
|
||||||
'list-fonts': list_fonts,
|
'list-fonts': list_fonts,
|
||||||
'+icat': icat,
|
|
||||||
'+list-fonts': list_fonts,
|
|
||||||
'@': remote_control,
|
'@': remote_control,
|
||||||
'+': namespaced,
|
'+': namespaced,
|
||||||
}
|
}
|
||||||
@ -42,6 +42,8 @@ def main():
|
|||||||
if func is None:
|
if func is None:
|
||||||
if first_arg.startswith('@'):
|
if first_arg.startswith('@'):
|
||||||
remote_control(['@', first_arg[1:]] + sys.argv[2:])
|
remote_control(['@', first_arg[1:]] + sys.argv[2:])
|
||||||
|
elif first_arg.startswith('+'):
|
||||||
|
namespaced(['+', first_arg[1:]] + sys.argv[2:])
|
||||||
else:
|
else:
|
||||||
from kitty.main import main
|
from kitty.main import main
|
||||||
main()
|
main()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user