File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,10 @@ from zulipterminal.config.keys import (
1111 KEY_BINDINGS ,
1212 display_keys_for_command ,
1313)
14- from zulipterminal .config .regexes import REGEX_READLINE_COMMANDS
14+ from zulipterminal .config .regexes import (
15+ REGEX_READLINE_COMMANDS ,
16+ REGEX_TERMINAL_COMMANDS ,
17+ )
1518
1619
1720# absolute path to zulip-terminal
@@ -52,6 +55,11 @@ def lint_all_external_commands() -> None:
5255 command_type = "Urwid Readline" ,
5356 suffix = "READLINE_SUFFIX" ,
5457 )
58+ lint_external_commands_by_type (
59+ regex_pattern = REGEX_TERMINAL_COMMANDS ,
60+ command_type = "General terminal" ,
61+ suffix = "GENERAL_TERMINAL_SUFFIX" ,
62+ )
5563 print ("All external commands have been linted successfully." )
5664
5765
Original file line number Diff line number Diff line change 1818
1919
2020READLINE_SUFFIX = "_READLINE"
21+ GENERAL_TERMINAL_SUFFIX = "_GENERAL_TERMINAL"
2122
2223
2324class KeyBinding (TypedDict ):
@@ -308,12 +309,12 @@ class KeyBinding(TypedDict):
308309 'excluded_from_random_tips' : True ,
309310 'key_category' : 'stream_list' ,
310311 },
311- 'REDRAW' : {
312+ 'REDRAW' + GENERAL_TERMINAL_SUFFIX : {
312313 'keys' : ['ctrl l' ],
313314 'help_text' : 'Redraw screen' ,
314315 'key_category' : 'general' ,
315316 },
316- 'QUIT' : {
317+ 'QUIT' + GENERAL_TERMINAL_SUFFIX : {
317318 'keys' : ['ctrl c' ],
318319 'help_text' : 'Quit' ,
319320 'key_category' : 'general' ,
Original file line number Diff line number Diff line change 77
88
99# (*) Stream and topic regexes
10- from zulipterminal .config .keys import READLINE_SUFFIX
10+ from zulipterminal .config .keys import GENERAL_TERMINAL_SUFFIX , READLINE_SUFFIX
1111
1212
1313REGEX_STREAM_NAME = r"([^*>]+)"
5353
5454# Example: UNDO_LAST_ACTION_READLINE
5555REGEX_READLINE_COMMANDS = rf"([A-Z_]+{ READLINE_SUFFIX } )"
56+ # Example: REDRAW_GENERAL_TERMINAL
57+ REGEX_TERMINAL_COMMANDS = rf"^.*([A-Z_]+{ GENERAL_TERMINAL_SUFFIX } )"
You can’t perform that action at this time.
0 commit comments