Files
fish-shell/share/functions
Evan Lloyd New-Schmidt a605bcb830 Show manpage for command under cursor
This commit lets you check the manpage for a leading command by moving
the cursor over it, matching the behavior of tab complete.

It also lets you select the man page for the base of a two-part command
like `string match`.

The additional regex case is added because
`commandline -t` returns an empty string when the cursor is after a
space, e.g. at the end of 'sudo ', which the later checks don't handle.

This diagram shows the manpage picked for different cursor positions:

    > sudo -Es time git commit -m foo
      +-------++---++--++------------+
      |       ||   ||  ||            |
      |       ||   ||  |+------------+
      |       ||   ||  |  git-commit
      |       ||   |+--+
      |       ||   | git
      |       |+---+
      |       | time
      +-------+
         sudo
2022-06-17 07:21:25 +02:00
..
2019-05-05 12:09:25 +02:00
2019-05-05 12:09:25 +02:00
2019-05-05 12:09:25 +02:00
2019-05-05 12:09:25 +02:00
2020-11-22 14:39:48 +01:00
2020-04-21 21:11:26 +02:00
2022-06-08 21:23:43 +02:00
2021-11-11 16:46:23 +01:00
2022-01-27 16:21:22 -08:00
2017-10-01 01:11:17 -07:00
2022-06-16 18:43:28 +02:00
2022-01-27 16:21:22 -08:00
2022-01-27 16:21:22 -08:00
2022-01-27 16:21:22 -08:00
2022-03-24 20:11:39 +01:00
2016-11-27 21:27:22 -08:00
2021-12-02 02:22:40 -08:00
2021-09-24 18:25:27 +02:00
2021-05-14 21:49:53 +02:00
2017-04-05 15:31:13 -07:00
2022-01-27 16:21:22 -08:00
2022-04-23 16:35:52 -07:00