From 3bcb694b1b54123b385d26774588e4fe97c5f0a1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 28 Aug 2022 11:54:32 +0530 Subject: [PATCH] Switch over to at-cmd form for references. Sphinx anyway converts at_cmd to at-cmd for anchors in HTML so using at-cmd consistently. --- docs/conf.py | 2 +- docs/faq.rst | 4 ++-- docs/remote-control.rst | 2 +- kitty/boss.py | 2 +- kitty/rc/base.py | 6 +++--- kitty/rc/new_window.py | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 3c68bde35..57eeef2b7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -249,7 +249,7 @@ if you specify a program-to-run you can use the special placeholder from kitty.rc.base import cli_params_for for cmd_name in sorted(all_command_names()): func = command_for_name(cmd_name) - p(f'.. _at_{func.name}:\n') + p(f'.. _at-{func.name}:\n') p('kitty @', func.name) p('-' * 120) p('.. program::', 'kitty @', func.name) diff --git a/docs/faq.rst b/docs/faq.rst index f41d6bf62..70e3c0425 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -132,8 +132,8 @@ You can also define keyboard shortcuts to set colors, for example:: map f1 set_colors --configured /path/to/some/config/file/colors.conf Or you can enable :doc:`remote control ` for |kitty| and use -:ref:`at_set-colors`. The shortcut mapping technique has the same syntax as the -remote control command, for details, see :ref:`at_set-colors`. +:ref:`at-set-colors`. The shortcut mapping technique has the same syntax as the +remote control command, for details, see :ref:`at-set-colors`. To change colors when SSHing into a remote host, use the :opt:`color_scheme ` setting for the :doc:`ssh kitten `. diff --git a/docs/remote-control.rst b/docs/remote-control.rst index d6ca0ee83..859f5e229 100644 --- a/docs/remote-control.rst +++ b/docs/remote-control.rst @@ -36,7 +36,7 @@ This will make ``Hello, World`` show up in the window running the :program:`cat` program. The :option:`kitty @ send-text --match` option is very powerful, it allows selecting windows by their titles, the command line of the program running in the window, the working directory of the program running in the -window, etc. See :ref:`kitty @ send-text --help ` for details. +window, etc. See :ref:`kitty @ send-text --help ` for details. More usefully, you can pipe the output of a command running in one window to another window, for example:: diff --git a/kitty/boss.py b/kitty/boss.py index 8de82195f..6fc045621 100644 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -2188,7 +2188,7 @@ class Boss: @ac('misc', ''' Change colors in the specified windows - For details, see :ref:`at_set-colors`. For example:: + For details, see :ref:`at-set-colors`. For example:: map f5 set_colors --configured /path/to/some/config/file/colors.conf ''') diff --git a/kitty/rc/base.py b/kitty/rc/base.py index baac8af24..183b95cab 100644 --- a/kitty/rc/base.py +++ b/kitty/rc/base.py @@ -87,7 +87,7 @@ For numeric fields: :code:`id`, :code:`pid`, :code:`num` and :code:`recent`, the a number, not a regular expression. The field :code:`num` refers to the window position in the current tab, starting from zero and counting clockwise (this -is the same as the order in which the windows are reported by the :ref:`kitty @ ls ` command). +is the same as the order in which the windows are reported by the :ref:`kitty @ ls ` command). The window id of the current window is available as the :envvar:`KITTY_WINDOW_ID` environment variable. @@ -102,7 +102,7 @@ The field :code:`state` matches on the state of the window. Supported states are Active windows are the windows that are active in their parent tab. There is only one focused window and it is the window to which keyboard events are delivered. -Note that you can use the :ref:`kitty @ ls ` command to get a list of windows. +Note that you can use the :ref:`kitty @ ls ` command to get a list of windows. ''' MATCH_TAB_OPTION = '''\ --match -m @@ -136,7 +136,7 @@ The field :code:`state` matches on the state of the tab. Supported states are: Active tabs are the tabs that are active in their parent OS window. There is only one focused tab and it is the tab to which keyboard events are delivered. -Note that you can use the :ref:`kitty @ ls ` command to get a list of tabs. +Note that you can use the :ref:`kitty @ ls ` command to get a list of tabs. ''' diff --git a/kitty/rc/new_window.py b/kitty/rc/new_window.py index 4969c4e51..1c04357b1 100644 --- a/kitty/rc/new_window.py +++ b/kitty/rc/new_window.py @@ -28,7 +28,7 @@ class NewWindow(RemoteCommand): short_desc = 'Open new window' desc = ( - 'DEPRECATED: Use the :ref:`launch ` command instead.\n\n' + 'DEPRECATED: Use the :ref:`launch ` command instead.\n\n' 'Open a new window in the specified tab. If you use the :option:`kitty @ new-window --match` option' ' the first matching tab is used. Otherwise the currently active tab is used.' ' Prints out the id of the newly opened window'