Commit graph

17 commits

Author SHA1 Message Date
Kovid Goyal
b6692849d6
more typing work 2020-03-12 14:52:11 +05:30
Kovid Goyal
ac2c21e046
more typing work 2020-03-09 16:13:00 +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
226488717a
Add completion for image filenames at command line
Sadly could not get it to work with the shell
2020-02-01 12:33:11 +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
2b095f720e
Use "with suppress()" to suppress python exceptions
Using
```Python
with suppress(OSError):
    os.remove('somefile.tmp')
```
instead of
```Python
try:
    os.remove('somefile.tmp')
except OSError:
    pass
```
makes the code more compact and more readable IMO.

This pattern was recommended by Raymond Hettinger, a Python Core
Developer in his talk "Transforming Code into Beautiful, Idiomatic Python" at https://www.youtube.com/watch?v=OSGv2VnC0go. The transcript is available at https://github.com/JeffPaine/beautiful_idiomatic_python
2019-06-03 12:27:43 +02: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
933cced76c
Implement completion for remote control commands 2018-08-25 14:51:59 +05:30
Kovid Goyal
9235d2b8e4
... 2018-08-06 18:38:23 +05:30
Kovid Goyal
255cacf912
kitty shell prompt: fallback to plain ascii prompt in case of unicode errors 2018-07-14 06:35:43 +05:30
Kovid Goyal
32f22e0ada
kitty shell: Ignore failure to read readline history file 2018-06-22 17:23:01 +05:30
Kovid Goyal
5dbaf9aab0
Clean up usage of TTYIO for remote cmds and the shell 2018-06-08 20:17:27 +05:30
Kovid Goyal
f68f8bf9c9
macOS: Fix changing tab title and kitty shell not working
I forgot that Apple has its own special snowflake readline variant.
Fixes #494
2018-04-27 15:16:26 +05:30
Kovid Goyal
b64bceac7f
Add a keyboard shortcut to open the kitty shell 2018-04-06 14:59:13 +05:30
Kovid Goyal
a97174a350
Add basic command name and option name completion to the shell 2018-04-06 14:07:14 +05:30
Kovid Goyal
6141c9fdda
Implement a command shell for kitty
Run it with:

kitty @
2018-04-06 12:11:37 +05:30