From 85e028cab1abd9c44cd7324119eec9faf5a5aace Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 24 Jul 2021 08:15:52 +0530 Subject: [PATCH] Add links to kitten source code --- docs/conf.py | 5 +++++ docs/kittens/broadcast.rst | 3 --- docs/kittens/clipboard.rst | 3 --- docs/kittens/diff.rst | 3 --- docs/kittens/hints.rst | 22 ++++++++++------------ docs/kittens/icat.rst | 3 --- docs/kittens/panel.rst | 3 --- docs/kittens/query_terminal.rst | 3 --- docs/kittens/unicode-input.rst | 3 --- 9 files changed, 15 insertions(+), 33 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index a263ae77b..0009a61d3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -246,6 +246,11 @@ if you specify a program-to-run you can use the special placeholder with open(f'generated/cli-kitten-{kitten}.rst', 'w') as f: p = partial(print, file=f) p('.. program::', f'kitty +kitten {kitten}') + p(f'\nSource code for {kitten}') + p('-' * 72) + p(f'\nThe source code for this kitten is `available on GitHub `_.') + p('\nCommand Line Interface') + p('-' * 72, file=f) p('\n\n' + option_spec_as_rst( data['options'], message=data['help_text'], usage=data['usage'], appname=f'kitty +kitten {kitten}', heading_char='^')) diff --git a/docs/kittens/broadcast.rst b/docs/kittens/broadcast.rst index 56c68ad1e..3e43bc4e1 100644 --- a/docs/kittens/broadcast.rst +++ b/docs/kittens/broadcast.rst @@ -19,7 +19,4 @@ are selected. .. program:: kitty +kitten broadcast -Command Line Interface --------------------------- - .. include:: /generated/cli-kitten-broadcast.rst diff --git a/docs/kittens/clipboard.rst b/docs/kittens/clipboard.rst index 9f5bae0de..0a8e052fe 100644 --- a/docs/kittens/clipboard.rst +++ b/docs/kittens/clipboard.rst @@ -23,7 +23,4 @@ use:: .. program:: kitty +kitten clipboard -Command Line Interface --------------------------- - .. include:: /generated/cli-kitten-clipboard.rst diff --git a/docs/kittens/diff.rst b/docs/kittens/diff.rst index 25a99dbc2..d383d9fa8 100644 --- a/docs/kittens/diff.rst +++ b/docs/kittens/diff.rst @@ -142,9 +142,6 @@ configuration directives. .. include:: /generated/conf-kitten-diff.rst -Command Line Interface -------------------------- - .. include:: /generated/cli-kitten-diff.rst diff --git a/docs/kittens/hints.rst b/docs/kittens/hints.rst index 6982bf679..32e8e15fa 100644 --- a/docs/kittens/hints.rst +++ b/docs/kittens/hints.rst @@ -88,16 +88,14 @@ Now run kitty with:: When you press the :kbd:`F1` key you will be able to select a word to look it up in the Google dictionary. - -Command Line Interface -------------------------- - -To avoid having to specify the same command line options on ever invocation, -you can use the :opt:`kitten_alias` option in :file:`kitty.conf` to create aliases -that have common sets of options. For example:: - - kitten_alias myhints hints --alphabet qfjdkslaureitywovmcxzpq1234567890 - -Documentation for the full set of options is below. - .. include:: ../generated/cli-kitten-hints.rst + +.. note:: + + To avoid having to specify the same command line options on ever invocation, + you can use the :opt:`kitten_alias` option in :file:`kitty.conf` to create aliases + that have common sets of options. For example:: + + kitten_alias myhints hints --alphabet qfjdkslaureitywovmcxzpq1234567890 + + Documentation for the full set of options is below. diff --git a/docs/kittens/icat.rst b/docs/kittens/icat.rst index 3c2be662d..32a29ee3f 100644 --- a/docs/kittens/icat.rst +++ b/docs/kittens/icat.rst @@ -37,7 +37,4 @@ The ``icat`` kitten has various command line arguments to allow it to be used from inside other programs to display images. In particular, :option:`--place`, :option:`--detect-support` and :option:`--print-window-size`. -Command Line Interface --------------------------- - .. include:: /generated/cli-kitten-icat.rst diff --git a/docs/kittens/panel.rst b/docs/kittens/panel.rst index af62affd3..3d4ed07c3 100644 --- a/docs/kittens/panel.rst +++ b/docs/kittens/panel.rst @@ -37,7 +37,4 @@ print out ``Hello, world!``. You can make the terminal program as complex as you like, as demonstrated in the screenshot above. -Command Line Interface -------------------------- - .. include:: ../generated/cli-kitten-panel.rst diff --git a/docs/kittens/query_terminal.rst b/docs/kittens/query_terminal.rst index bdd6f0e34..e3aee3476 100644 --- a/docs/kittens/query_terminal.rst +++ b/docs/kittens/query_terminal.rst @@ -15,7 +15,4 @@ for *XTGETTCAP* to see the syntax for the escape code and read the source of this kitten to find the values of the keys for the various queries. -Command Line Interface -------------------------- - .. include:: ../generated/cli-kitten-query_terminal.rst diff --git a/docs/kittens/unicode-input.rst b/docs/kittens/unicode-input.rst index 9195607e8..52e7d7772 100644 --- a/docs/kittens/unicode-input.rst +++ b/docs/kittens/unicode-input.rst @@ -28,7 +28,4 @@ You can switch between modes using either the function keys or by pressing :kbd:`Ctrl+Shift+Tab`. -Command Line Interface -------------------------- - .. include:: ../generated/cli-kitten-unicode_input.rst