Commit Graph

47 Commits

Author SHA1 Message Date
Kovid Goyal
d5c48ddb94 Allow inputting fingerprint check 2022-03-12 08:23:10 +05:30
Kovid Goyal
14e0b01b40 Echo asterisks when inputting the password 2022-03-11 16:44:08 +05:30
Kovid Goyal
5bb6b29ca3 Allow controlling the prompt used to input the password 2022-03-11 16:44:08 +05:30
Kovid Goyal
61558d518e Get askpass basically working 2022-03-11 16:44:08 +05:30
Kovid Goyal
0a3acd9738 ask kitten: Use buttons for choices as well 2022-01-22 13:57:25 +05:30
Kovid Goyal
d4e7587686 use underline instead of color for default choice 2022-01-22 12:35:43 +05:30
Kovid Goyal
32e31a3c6b Cancelling the choice kitten should return the empty response 2022-01-22 12:13:32 +05:30
Kovid Goyal
9419125387 Highlight the default choice in yellow 2022-01-22 11:45:01 +05:30
Kovid Goyal
1bbab217d0 ask kitten: Always have a default choice 2022-01-22 11:39:54 +05:30
Kovid Goyal
05d648d411 ask kitten: Draw yes/no buttons 2022-01-22 11:32:26 +05:30
Kovid Goyal
5c832d3190 Allow multiple clickable ranges 2022-01-22 10:52:44 +05:30
Kovid Goyal
0d33380e6a Cleanup previous PR
yesno default should be yes.
Pressing q to quit is undiscoverable
Clicking empty cells should not trigger buttons as that is
undiscoverable and possibly surprising
2022-01-22 10:44:01 +05:30
Kovid Goyal
9944b895a6 Merge branch 'kitten-ask' of https://github.com/page-down/kitty 2022-01-22 10:06:52 +05:30
Kovid Goyal
fe7045dd2f Ask kitten: Fix rendering of multiline messages 2022-01-22 09:40:05 +05:30
pagedown
4fe10fadb0 ... 2022-01-22 09:45:32 +08:00
pagedown
88ee5e95fc Add default choices for features that use ask kitten 2022-01-22 03:21:59 +08:00
pagedown
9a119255fe ask kitten: Use the default value as input text
Prefill the current value when changing the tab title.
2022-01-22 03:11:39 +08:00
pagedown
7ce11050cd ask kitten: Esc to abort and Enter to confirm the default choice 2022-01-22 02:50:50 +08:00
pagedown
9b4d1219b8 Add default choice option for ask kitten 2022-01-22 02:46:37 +08:00
pagedown
4dd29c726a Make the clickable range of No the same as Yes
Since the two options are treated equally, the same amount of mouse
clickable range are given.
2022-01-22 02:41:52 +08:00
Kovid Goyal
17e31565e2 Get it working even with 2 row windows assuming they are wide enough to fit the title on a single line 2022-01-21 21:46:27 +05:30
Kovid Goyal
dd72deb546 Allow ask kitten to function in a 3 line window 2022-01-21 21:43:25 +05:30
Kovid Goyal
cd0ca95877 Improve the UI of the ask kitten
Center the text in the window and allow pressing enter/esc when doing a
yes/no question

Fixes #4545
2022-01-21 20:02:13 +05:30
Kovid Goyal
6546c1da9b run pyupgrade to upgrade the codebase to python3.6 2021-10-21 12:43:55 +05:30
Kovid Goyal
b1375e5ed1 ask kitten: Allow clicking on a choice to select it
Fixes #4071
2021-09-28 20:13:11 +05:30
Kovid Goyal
0f9d6a1e4a Forgot to clear screen before drawing 2021-09-28 12:56:19 +05:30
Kovid Goyal
276696414e Use a full handler for choices in the ask kitten 2021-09-28 09:14:34 +05:30
Kovid Goyal
7f1c5d8534 DRYer 2021-08-21 17:32:55 +05:30
Kovid Goyal
d60020f5ac Allow copying hyperlink URL to clipboard 2020-09-15 13:23:31 +05:30
Kovid Goyal
437efe5473 Allow using the ask kitten to pick a choice 2020-09-15 12:39:07 +05:30
Kovid Goyal
e6839b45e3 typo 2020-09-10 11:57:41 +05:30
Kovid Goyal
5768cc98b6 ... 2020-05-15 13:31:35 +05:30
Kovid Goyal
da1cc6c1c5 Add a yes/no mode to the ask kitten 2020-05-15 13:16:14 +05:30
Kovid Goyal
382c31ddf2 Use a stub rather than TYPE_CHECKING 2020-03-15 13:27:40 +05:30
Kovid Goyal
149ae2866a more typing work 2020-03-12 08:10:51 +05:30
Kovid Goyal
afec07b124 More typing work 2020-03-06 14:19:46 +05:30
Kovid Goyal
f05890719d Add type checking for the various CLI options objects 2020-03-05 15:47:12 +05:30
Kovid Goyal
a4cc10c41b More typing work 2020-03-04 06:10:57 +05:30
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
66a52ac588 Also ignore failure to read readline history in the ask kitten 2018-06-22 17:23:55 +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
83a3d99824 Make --help work for all kittens 2018-04-12 09:33:50 +05:30
Kovid Goyal
cb7fff6986 Refactor the ask kitten to use the new API 2018-04-11 14:40:58 +05:30
Kovid Goyal
be8f2b8106 Create a shortcut to set the tab title
No longer need to use remote control just to change tab titles.
2018-03-25 09:55:02 +05:30
Kovid Goyal
71db024a3b Add history based completion to the ask kitten 2018-03-24 11:49:34 +05:30
Kovid Goyal
3790af6897 Basic ask kitten 2018-03-23 18:03:43 +05:30