Commit Graph
53 Commits
Author SHA1 Message Date
Kovid Goyal be1ff61e4a Improve some utility functions
Make expandvars accept both $VARNAME and ${VARNAME} now matches
the behavior of posixpath.expandvars

Allow overriding the environment variables to_cmdline expands against
2020-09-18 13:25:59 +05:30
Kovid Goyal c92aca5d19 Use a Literal as the type for choice based options 2020-04-24 19:45:51 +05:30
Kovid Goyal a46c3f7007 Replace use of cast() 2020-03-24 22:03:10 +05:30
Kovid Goyal 5f06d3a427 Disallow untyped decorators 2020-03-14 14:50:04 +05:30
Kovid Goyal a348f64833 more typing work 2020-03-13 21:41:07 +05:30
Kovid Goyal 891b184195 misc typing fixes 2020-03-13 16:45:39 +05:30
Kovid Goyal 917559f883 more typing work 2020-03-13 16:13:26 +05:30
Kovid Goyal 2ebdf738ca more typing work 2020-03-11 20:08:16 +05:30
Kovid Goyal bb8cab3a02 Add type information for tui operations cmds 2020-03-10 22:25:57 +05:30
Kovid Goyal 8ae110691e More typing work 2020-03-09 21:06:13 +05:30
Kovid Goyal 9b973ef99c More typing work 2020-03-08 20:36:50 +05:30
Kovid Goyal 308d171dae More typing work 2020-03-08 18:55:30 +05:30
Kovid Goyal cc1336a616 More typing work
Also use a mypy based linter when editing
2020-03-08 11:02:14 +05:30
Kovid Goyal 9b32f18109 Refactor remote control commands into individual modules
Also add type information
2020-03-08 08:39:26 +05:30
Kovid Goyal afec07b124 More typing work 2020-03-06 14:19:46 +05:30
Kovid Goyal 77e9460eea Make mypy a bit stricter 2020-03-05 19:57:28 +05:30
Kovid Goyal a76a163db5 kitty.config is typed 2020-03-05 18:17:21 +05:30
Kovid Goyal f05890719d Add type checking for the various CLI options objects 2020-03-05 15:47:12 +05:30
Kovid Goyal 0f4e7921ee Create an auto-generated stub file for the kitty Options object 2020-03-04 19:14:50 +05:30
Luflosi 527ff0238a Replace all instances of EnvironmentError with OSError
According to the text just above https://docs.python.org/3/library/exceptions.html#EnvironmentError, `EnvironmentError` has been an alias of `OSError` since Python 3.3. Replacing it makes the code more consistent since `OSError` is used in other places in the code too.
2020-01-11 16:47:36 +01:00
Luflosi 5f855ce547 Use context managers to open files
Inspired by https://github.com/kovidgoyal/calibre/commit/d50a6ddc1b71a575283e344a0d7bc539539bc5d1.
2019-08-01 13:21:26 -05:00
Luflosi a792c94ccf Use python3 shebang for all python scripts
Fixes #1624.
Use python3 shebang for all python scripts as python still defaults to python2 on many systems.
2019-05-20 14:44:24 +02:00
Kovid Goyal c660840c19 When encountering errors in kitty.conf report them to the user instead of failing to start. 2019-04-28 20:53:59 +05:30
Kovid Goyal 5953c2097d Expand env vars throughout command lines
When converting strings to command lines interpret env vars in all the
parts of the command line not just the first item. Fixes #1535
2019-04-13 13:53:32 +05:30
Kovid Goyal b6724ed177 ... 2019-03-24 10:06:18 +05:30
Kovid Goyal fcedc9f5c3 Allow setting :opt:active_border_color to `none` to not draw a border around the active window
Fixes #805
Fixes #1491
2019-03-24 10:04:32 +05:30
Luflosi ed62e72a98 Warn when a line in the config file is invalid 2019-03-14 18:46:36 +01:00
Luflosi a28710c1fc Minor refactor 2019-03-14 18:46:36 +01:00
Kovid Goyal b49b34c4c1 Micro-optimization 2019-02-14 15:41:29 +05:30
Kovid Goyal 1d275c6b35 Only import the ast module on demand 2018-08-27 12:43:20 +05:30
Kovid Goyal 1695f6800c Expand links to kitty docs in sample kitty.conf 2018-07-20 21:21:52 +05:30
Kovid Goyal 568a4c9b5d Re-raise KeyError idiomatically 2018-06-29 13:49:08 +05:30
Marcus Albertsson 12975347ee Fix: Exception in conf utils
The bug was related to trying to split a string with unstript spaces in
the action parameter. It resulted in a unbound error as there was no
previous raise when getting the key from args_funcs. The fix is twofold,
it makes sure that we raise the keyerror if we're trying to grab a non
existing key and we're stripping the spaces from the action before
splitting.

This should fix both the unbound error and the not being able to resolve
correct actions.
2018-06-29 08:56:25 +01:00
Kovid Goyal 53ae5a4f8d A new tab bar style 2018-06-06 13:27:15 +05:30
Kovid Goyal 351e1a5a15 Tabulate consecutive maps 2018-06-05 14:06:57 +05:30
Kovid Goyal 3983953e72 Indented blocks should also be doc-commented 2018-06-05 13:54:39 +05:30
Kovid Goyal 84ad0604f4 Wrap generated conf file 2018-06-05 13:22:09 +05:30
Kovid Goyal 2b0d8bfe46 Get rid of the default kitty.conf 2018-06-05 09:17:31 +05:30
Kovid Goyal 4fa8cb562a Finish adding shortcuts to docs 2018-06-05 07:52:31 +05:30
Kovid Goyal 429efd70ff More conf docs 2018-06-05 07:52:31 +05:30
Kovid Goyal 4c636fdeca More conf docs 2018-06-05 07:52:31 +05:30
Kovid Goyal 1168687923 More conf docs 2018-06-05 07:52:30 +05:30
Kovid Goyal db32079bd8 More conf docs 2018-06-05 07:52:30 +05:30
Kovid Goyal e8bd6f4493 Initial stab at adding shortcuts to the docs 2018-06-05 07:52:30 +05:30
Kovid Goyal cd36e3b314 oops 2018-06-05 07:52:30 +05:30
Kovid Goyal b98fca972f More conf docs
Add a 🔗 role that works nicely in both contexts
2018-06-05 07:52:29 +05:30
Kovid Goyal 6c1434ab8a More conf docs
Also dont parse option values unnecessarily
2018-06-05 07:52:29 +05:30
Kovid Goyal b6d33e2019 More conf docs 2018-06-05 07:52:29 +05:30
Kovid Goyal 2ae3157d49 Simplify by using the option definition as a title 2018-06-05 07:52:28 +05:30
Kovid Goyal 1c2c98c1a4 More conf docs 2018-06-05 07:52:28 +05:30