From 60835871eb8d99f109fea121f4eab923157fd53b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 28 Jan 2020 15:23:08 +0530 Subject: [PATCH] Better error message when user does not specify strategy for disabling ligatures --- kitty/cmds.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kitty/cmds.py b/kitty/cmds.py index 9f3adbeb4..4df78d00c 100644 --- a/kitty/cmds.py +++ b/kitty/cmds.py @@ -1273,9 +1273,13 @@ def cmd_disable_ligatures(global_opts, opts, args): match_tab: Tab to change opacity in all: Boolean indicating operate on all windows ''' + if not args: + raise SystemExit( + 'You must specify the STRATEGY for disabling ligatures, must be one of' + ' never, always or cursor') strategy = args[0] if strategy not in ('never', 'always', 'cursor'): - raise ValueError('{} is not a valid disable_ligatures strategy'.format('strategy')) + raise SystemExit('{} is not a valid disable_ligatures strategy'.format('strategy')) return { 'strategy': strategy, 'match_window': opts.match, 'match_tab': opts.match_tab, 'all': opts.all,