From 7780d52930a171bc4713d1895f6f38cdbeb0a6d3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 12 Jan 2018 11:27:23 +0530 Subject: [PATCH] DRYer --- __main__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/__main__.py b/__main__.py index 4fc613ade..2a075e61b 100644 --- a/__main__.py +++ b/__main__.py @@ -21,15 +21,15 @@ def remote_control(args): def namespaced(args): - func = namespaced_entry_points[args[0]] + func = namespaced_entry_points[args[1]] func(args[1:]) entry_points = { + # These two are here for backwards compat 'icat': icat, 'list-fonts': list_fonts, - '+icat': icat, - '+list-fonts': list_fonts, + '@': remote_control, '+': namespaced, } @@ -42,6 +42,8 @@ def main(): if func is None: if first_arg.startswith('@'): remote_control(['@', first_arg[1:]] + sys.argv[2:]) + elif first_arg.startswith('+'): + namespaced(['+', first_arg[1:]] + sys.argv[2:]) else: from kitty.main import main main()