44 Commits

Author SHA1 Message Date
Kovid Goyal
9edad62144
hints kitten: Allow using named groups in the regular expression. The named groups are passed to the invoked program for further processing. 2019-11-11 17:34:19 +05:30
Luflosi
6cc720a350
Fix typos
Inspired by 4d3ee554b3.
Found using `codespell`.
2019-08-26 12:31:15 +02:00
Kovid Goyal
afcaca85da
Merge branch 'hints_regex_doc' of https://github.com/toonn/kitty 2019-08-18 07:41:14 +05:30
Toon Nolten
2575349ec2 Add expected regex syntax to hints kitten docs
The hints kitten's help documentation did not mention what syntax to use
for the regular expressions. I knew much of kitty was implemented in
python so I guessed correctly but not everyone might know this.

I also fixed some double-spaced sentences because most of them are
single-spaced.
2019-08-17 21:27:53 +02:00
Kovid Goyal
bdf7d98a36
hints kitten: Allow specifying :option:kitty +kitten hints --program multiple times to run multiple programs
See #1879
2019-08-02 10:03:04 +05:30
Kovid Goyal
68f3b6fbeb
Fix the decode_hint function to work with an arbitrary alphabet 2019-08-01 19:31:21 +05:30
Kovid Goyal
dc6d14943e
Dont use a global variable for the hints alphabet 2019-08-01 19:24:09 +05:30
Kovid Goyal
05f7334db9
hints kitten: Add a :option:kitty +kitten hints --alphabet option to control what alphabets are used for hints
Fixes #1879
2019-08-01 16:25:54 +05:30
Kovid Goyal
2719926870
Add some documentation on how to get regexes in the hints kitten to match over multiple lines. 2019-07-03 10:45:37 +05:30
Luflosi
4eed8463b3
Simplify chained comparisions 2019-06-05 15:24:36 +02:00
Kovid Goyal
4f163338dd
Allow controlling how multiple selections are handled in the hints kitten
Fixes #1665
2019-06-02 09:23:20 +05:30
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
c8dfe955d7
... 2019-01-29 11:08:34 +05:30
Kovid Goyal
c94e06ccd2
hints kitten: Start hints numbering at one instead of zero by default. Added an option `--hints-offset` to control it.
Fixes #1289
Fixes #1290
2019-01-08 07:31:54 +05:30
Maxim Baz
f26519863f
Don't include --progam in the condition 2018-11-10 13:24:39 +01:00
Maxim Baz
a57e96500a
hints: optionally add trailing space 2018-11-10 13:19:40 +01:00
Kovid Goyal
d964146f8c
Use ctermid() instead of hardcoding /dev/tty 2018-08-04 20:58:01 +05:30
Kovid Goyal
e5a720c6fa
Fix detection of URLs in HTML source code (URLs inside quotes)
Fixes #785
2018-08-03 12:28:23 +05:30
Kovid Goyal
341a34ea9e
Assume file extensions are up to 7 chars long
See .desktop files
2018-07-26 18:37:13 +05:30
Kovid Goyal
2c3235d452
Remove need to call super-class on_resize method 2018-07-15 16:19:54 +05:30
Kovid Goyal
65fef81f29
hints kitten: Add an option to select multiple items
Fixes #687
2018-06-29 06:49:16 +05:30
Robert Ricci
da6ad5df45 Switch to generic hash instead of sha1 specifically
Suggested by @maximbaz
2018-06-04 15:43:03 -06:00
Robert Ricci
a9f394ce18 Fix stray text 2018-06-04 14:28:35 -06:00
Robert Ricci
093921cb9a Add support for sha1 hashes to the hint kitten
This is specifically intended for git commit hashes, so it allows for
hashes as short as 7 characters (git's default length for abbreviated
hashes) up to the full 40 characters
2018-06-04 14:25:38 -06:00
Kovid Goyal
7236e0ff21
Add CLI docs for the hints kitten 2018-06-02 13:04:25 +05:30
Kovid Goyal
f36e6f0461
Nicer handling of empty lines 2018-05-26 13:40:43 +05:30
Kovid Goyal
978dc008e2
hints kitten: Fix a regression that caused some blank lines to be not displayed 2018-05-26 13:35:44 +05:30
Kovid Goyal
48847cdaf8
hints kitten: Fix detection of URLs in ReStructuredText 2018-05-21 16:14:49 +05:30
Kovid Goyal
646a349d82
... 2018-05-19 15:11:08 +05:30
Kovid Goyal
ad1109b6fe
Hints kitten: Overhaul making it more intelligent
It now uses information about the geometry of the screen.
So URLs that stretch over multiple lines are detected even if there is a
hard line break in between (some programs like mutt generate these).
2018-05-19 14:31:00 +05:30
Kovid Goyal
2a713cab60
kittens should specify their own required input type
It is DRYer. Also replace the run_kitten function with just kitten that
takes no type of input argument. Backward compat for run_kitten is
maintained.
2018-05-18 22:55:42 +05:30
Kovid Goyal
26df57a1c7
More elegant handling for pressing enter with no valid current input in the hints kitten 2018-05-18 21:28:43 +05:30
Kovid Goyal
61a2360df5
hints kitten: Detect bracketed URLs and dont include the closing bracket in the URL. 2018-04-25 14:33:37 +05:30
Kovid Goyal
316e7cb9f5
Also use cwd of child when opening programs via the hints kitten 2018-04-25 09:07:35 +05:30
Kovid Goyal
20c42ab519
tui: Allow handlers to finalize() as well as initialize() 2018-04-22 13:14:25 +05:30
Kovid Goyal
ba177c61bc
... 2018-04-16 16:46:42 +05:30
Kovid Goyal
52f4e81d59
hints kitten: Reverse order of hints
Gives hints at the bottom of the screen smaller numbers. In
non-fullscreen usage matches closer to the bottom are more likely to be
the ones the user is looking for. Fixes #460
2018-04-14 23:07:53 +05:30
Kovid Goyal
1056ab1b81
Store marks in the index map 2018-04-14 23:01:49 +05:30
Kovid Goyal
339a2e0800
Add a word select type to the hints kitten 2018-04-12 13:49:12 +05:30
Kovid Goyal
c95d1393cc
Add some more default keybindings for the hints kitten 2018-04-12 13:01:16 +05:30
Kovid Goyal
6a090ac740
Add a --type argument to hints kitten
Allows addition of more sophisticated types of matches later.
2018-04-12 10:30:32 +05:30
Kovid Goyal
3c7236557c
hints: Use --program=@ to copy to clipboard 2018-04-12 10:16:48 +05:30
Kovid Goyal
83a3d99824
Make --help work for all kittens 2018-04-12 09:33:50 +05:30
Kovid Goyal
808750a76a
Rename url_hints to just hints 2018-04-12 09:23:48 +05:30