From 0a2f164062875e341a5574ef2f3763e7fca34023 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 21 Sep 2023 12:25:02 +0530 Subject: [PATCH] Change kitty +kitten -> kitten in docs All kittens except for the broadcast and panel kittens have now been ported to Go and so can be run with just kitten rather than kitty +kitten. So update the docs to use this canonical form for launching kittens --- docs/faq.rst | 12 ++++++------ docs/graphics-protocol.rst | 2 +- docs/integrations.rst | 2 +- docs/intro_vid.rst | 6 +++--- docs/keyboard-protocol.rst | 2 +- docs/kittens/clipboard.rst | 16 ++++++++-------- docs/kittens/diff.rst | 8 ++++---- docs/kittens/hyperlinked_grep.rst | 4 ++-- docs/kittens/icat.rst | 4 ++-- docs/kittens/ssh.rst | 6 +++--- docs/kittens/themes.rst | 4 ++-- docs/open_actions.rst | 2 +- docs/shell-integration.rst | 2 +- kittens/clipboard/main.py | 12 ++++++------ kittens/hints/main.py | 2 +- kittens/icat/main.py | 2 +- kitty/open_actions.py | 2 +- kitty/options/definition.py | 2 +- 18 files changed, 45 insertions(+), 45 deletions(-) diff --git a/docs/faq.rst b/docs/faq.rst index 2fd8f0154..32a5a70f9 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -99,7 +99,7 @@ These issues all have the same root cause: the kitty terminfo files not being available. The most common way this happens is SSHing into a computer that does not have the kitty terminfo files. The simplest fix for that is running:: - kitty +kitten ssh myserver + kitten ssh myserver It will automatically copy over the terminfo files and also magically enable :doc:`shell integration ` on the remote machine. @@ -108,7 +108,7 @@ This :doc:`ssh kitten ` takes all the same command line arguments as :program:`ssh`, you can alias it to something small in your shell's rc files to avoid having to type it each time:: - alias s="kitty +kitten ssh" + alias s="kitten ssh" If this does not work, see :ref:`manual_terminfo_copy` for alternative ways to get the kitty terminfo files onto a remote computer. @@ -148,7 +148,7 @@ I cannot use the key combination X in program Y? First, run:: - kitty +kitten show_key -m kitty + kitten show_key -m kitty Press the key combination X. If the kitten reports the key press that means kitty is correctly sending the key press to terminal programs. @@ -172,7 +172,7 @@ How do I change the colors in a running kitty instance? The easiest way to do it is to use the :doc:`themes kitten `, to choose a new color theme. Simply run:: - kitty +kitten themes + kitten themes And choose your theme from the list. @@ -391,7 +391,7 @@ For example:: This maps :kbd:`alt+s` to :kbd:`ctrl+s`. To figure out what bytes to use for the :sc:`send_text ` you can use the ``show_key`` kitten. Run:: - kitty +kitten show_key + kitten show_key Then press the key you want to emulate. Note that this kitten will only show keys that actually reach the terminal program, in particular, keys mapped to @@ -399,7 +399,7 @@ actions in kitty will not be shown. To check those first map them to :ac:`no_op`. You can also start a kitty instance without any shortcuts to interfere:: - kitty -o clear_all_shortcuts=yes kitty +kitten show_key + kitty -o clear_all_shortcuts=yes kitten show_key How do I open a new window or tab with the same working directory as the current window? diff --git a/docs/graphics-protocol.rst b/docs/graphics-protocol.rst index 487d85312..a7ffefaff 100644 --- a/docs/graphics-protocol.rst +++ b/docs/graphics-protocol.rst @@ -16,7 +16,7 @@ For some discussion regarding the design choices, see :iss:`33`. To see a quick demo, inside a |kitty| terminal run:: - kitty +kitten icat path/to/some/image.png + kitten icat path/to/some/image.png You can also see a screenshot with more sophisticated features such as alpha-blending and text over graphics. diff --git a/docs/integrations.rst b/docs/integrations.rst index 9f53d2cd2..cb024aa5c 100644 --- a/docs/integrations.rst +++ b/docs/integrations.rst @@ -144,7 +144,7 @@ kitty with the following bash snippet: set terminal pngcairo enhanced font 'Fira Sans,10' set autoscale set samples 1000 - set output '|kitty +kitten icat --stdin yes' + set output '|kitten icat --stdin yes' set object 1 rectangle from screen 0,0 to screen 1,1 fillcolor rgb"#fdf6e3" behind plot $@ set output '/dev/null' diff --git a/docs/intro_vid.rst b/docs/intro_vid.rst index 82c6771e4..07e6e06df 100644 --- a/docs/intro_vid.rst +++ b/docs/intro_vid.rst @@ -58,15 +58,15 @@ Timestamps for the above video: 14:15 Interactive Kitty Shell: :kbd:`Ctrl+Shift+Esc` 14:36 - Broadcast text: ``launch --allow-remote-control kitty +kitten broadcast`` + Broadcast text: ``launch --allow-remote-control kitten broadcast`` 15:18 Kitty Remote Control Protocol 15:52 Interactive Kitty Shell: Help 16:34 - Choose theme interactively: ``kitty +kitten themes -h`` + Choose theme interactively: ``kitten themes -h`` 17:23 - Choose theme by name: ``kitty +kitten themes [options] [theme_name]`` + Choose theme by name: ``kitten themes [options] [theme_name]`` .. raw:: html diff --git a/docs/keyboard-protocol.rst b/docs/keyboard-protocol.rst index 7fab24381..3ecd59772 100644 --- a/docs/keyboard-protocol.rst +++ b/docs/keyboard-protocol.rst @@ -28,7 +28,7 @@ issues in that proposal, listed at the :ref:`bottom of this document You can see this protocol with all enhancements in action by running:: - kitty +kitten show_key -m kitty + kitten show_key -m kitty inside the kitty terminal to report key events. diff --git a/docs/kittens/clipboard.rst b/docs/kittens/clipboard.rst index 3ff8c0a64..5ac48c533 100644 --- a/docs/kittens/clipboard.rst +++ b/docs/kittens/clipboard.rst @@ -9,13 +9,13 @@ clipboard The ``clipboard`` kitten can be used to read or write to the system clipboard from the shell. It even works over SSH. Using it is as simple as:: - echo hooray | kitty +kitten clipboard + echo hooray | kitten clipboard All text received on :file:`STDIN` is copied to the clipboard. To get text from the clipboard:: - kitty +kitten clipboard --get-clipboard + kitten clipboard --get-clipboard The text will be written to :file:`STDOUT`. Note that by default kitty asks for permission when a program attempts to read the clipboard. This can be @@ -29,22 +29,22 @@ more than just plain text from the system clipboard. You can transfer arbitrary data types. Best illustrated with some examples:: # Copy an image to the clipboard: - kitty +kitten clipboard picture.png + kitten clipboard picture.png # Copy an image and some text to the clipboard: - kitty +kitten clipboard picture.jpg text.txt + kitten clipboard picture.jpg text.txt # Copy text from STDIN and an image to the clipboard: - echo hello | kitty +kitten clipboard picture.png /dev/stdin + echo hello | kitten clipboard picture.png /dev/stdin # Copy any raster image available on the clipboard to a PNG file: - kitty +kitten clipboard -g picture.png + kitten clipboard -g picture.png # Copy an image to a file and text to STDOUT: - kitty +kitten clipboard -g picture.png /dev/stdout + kitten clipboard -g picture.png /dev/stdout # List the formats available on the system clipboard - kitty +kitten clipboard -g -m . /dev/stdout + kitten clipboard -g -m . /dev/stdout Normally, the kitten guesses MIME types based on the file names. To control the MIME types precisely, use the :option:`--mime ` option. diff --git a/docs/kittens/diff.rst b/docs/kittens/diff.rst index 3cadaf1e0..960aa924f 100644 --- a/docs/kittens/diff.rst +++ b/docs/kittens/diff.rst @@ -39,7 +39,7 @@ Usage In the kitty terminal, run:: - kitty +kitten diff file1 file2 + kitten diff file1 file2 to see the diff between :file:`file1` and :file:`file2`. @@ -48,7 +48,7 @@ example: .. code-block:: sh - alias d="kitty +kitten diff" + alias d="kitten diff" Now all you need to do to diff two files is:: @@ -103,9 +103,9 @@ Add the following to :file:`~/.gitconfig`: prompt = false trustExitCode = true [difftool "kitty"] - cmd = kitty +kitten diff $LOCAL $REMOTE + cmd = kitten diff $LOCAL $REMOTE [difftool "kitty.gui"] - cmd = kitty kitty +kitten diff $LOCAL $REMOTE + cmd = kitten diff $LOCAL $REMOTE Now to use kitty-diff to view git diffs, you can simply do:: diff --git a/docs/kittens/hyperlinked_grep.rst b/docs/kittens/hyperlinked_grep.rst index 685debdd7..b3e6286d7 100644 --- a/docs/kittens/hyperlinked_grep.rst +++ b/docs/kittens/hyperlinked_grep.rst @@ -26,7 +26,7 @@ following contents: Now, run a search with:: - kitty +kitten hyperlinked_grep something + kitten hyperlinked_grep something Hold down the :kbd:`Ctrl+Shift` keys and click on any of the result lines, to open the file in :program:`vim` at the matching line. If you use some editor @@ -36,7 +36,7 @@ accordingly. Finally, add an alias to your shell's rc files to invoke the kitten as :command:`hg`:: - alias hg="kitty +kitten hyperlinked_grep" + alias hg="kitten hyperlinked_grep" You can now run searches with:: diff --git a/docs/kittens/icat.rst b/docs/kittens/icat.rst index 8391c8742..6b474d230 100644 --- a/docs/kittens/icat.rst +++ b/docs/kittens/icat.rst @@ -6,7 +6,7 @@ icat The ``icat`` kitten can be used to display arbitrary images in the |kitty| terminal. Using it is as simple as:: - kitty +kitten icat image.jpeg + kitten icat image.jpeg kitten icat image.jpeg It supports all image types supported by `ImageMagick @@ -15,7 +15,7 @@ It supports all image types supported by `ImageMagick You might want to create an alias in your shell's configuration files:: - alias icat="kitty +kitten icat" + alias icat="kitten icat" Then you can simply use ``icat image.png`` to view images. diff --git a/docs/kittens/ssh.rst b/docs/kittens/ssh.rst index e969de1ff..6aed956cf 100644 --- a/docs/kittens/ssh.rst +++ b/docs/kittens/ssh.rst @@ -33,14 +33,14 @@ To try it out, simply run: .. code-block:: sh - kitty +kitten ssh some-hostname-to-connect-to + kitten ssh some-hostname-to-connect-to You should end up at a shell prompt on the remote host, with shell integration enabled. If you like it you can add an alias to it in your shell's rc files: .. code-block:: sh - alias s="kitty +kitten ssh" + alias s="kitten ssh" So now you can just type ``s hostname`` to connect. @@ -79,7 +79,7 @@ Additionally, you can pass config options on the command line: .. code-block:: sh - kitty +kitten ssh --kitten interpreter=python servername + kitten ssh --kitten interpreter=python servername The :code:`--kitten` argument can be specified multiple times, with directives from :file:`ssh.conf`. These override the final options used for the matched host, as if they diff --git a/docs/kittens/themes.rst b/docs/kittens/themes.rst index ab0883884..f4cb57a4b 100644 --- a/docs/kittens/themes.rst +++ b/docs/kittens/themes.rst @@ -5,7 +5,7 @@ The themes kitten allows you to easily change color themes, from a collection of over three hundred pre-built themes available at `kitty-themes `_. To use it, simply run:: - kitty +kitten themes + kitten themes .. image:: ../screenshots/themes.png @@ -72,7 +72,7 @@ Changing the theme non-interactively You can specify the theme name as an argument when invoking the kitten to have it change to that theme instantly. For example:: - kitty +kitten themes --reload-in=all Dimmed Monokai + kitten themes --reload-in=all Dimmed Monokai Will change the theme to ``Dimmed Monokai`` in all running kitty instances. See below for more details on non-interactive operation. diff --git a/docs/open_actions.rst b/docs/open_actions.rst index 9891a64e2..551d7172c 100644 --- a/docs/open_actions.rst +++ b/docs/open_actions.rst @@ -15,7 +15,7 @@ clicked. Let us illustrate with some examples, first. Create the file # Open any image in the full kitty window by clicking on it protocol file mime image/* - action launch --type=overlay kitty +kitten icat --hold ${FILE_PATH} + action launch --type=overlay kitten icat --hold ${FILE_PATH} Now, run ``ls --hyperlink=auto`` in kitty and click on the filename of an image, holding down :kbd:`ctrl+shift`. It will be opened over the current diff --git a/docs/shell-integration.rst b/docs/shell-integration.rst index 1e4c2cc47..06edac11d 100644 --- a/docs/shell-integration.rst +++ b/docs/shell-integration.rst @@ -214,7 +214,7 @@ Shell integration over SSH The easiest way to have shell integration work when SSHing into remote systems is to use the :doc:`ssh kitten `. Simply run:: - kitty +kitten ssh hostname + kitten ssh hostname And, by magic, you will be logged into the remote system with fully functional shell integration. Alternately, you can :ref:`setup shell integration manually diff --git a/kittens/clipboard/main.py b/kittens/clipboard/main.py index 08b16d776..61340512c 100644 --- a/kittens/clipboard/main.py +++ b/kittens/clipboard/main.py @@ -60,22 +60,22 @@ the clipboard. Some examples: .. code:: sh # Copy an image to the clipboard: - kitty +kitten clipboard picture.png + kitten clipboard picture.png # Copy an image and some text to the clipboard: - kitty +kitten clipboard picture.jpg text.txt + kitten clipboard picture.jpg text.txt # Copy text from STDIN and an image to the clipboard: - echo hello | kitty +kitten clipboard picture.png /dev/stdin + echo hello | kitten clipboard picture.png /dev/stdin # Copy any raster image available on the clipboard to a PNG file: - kitty +kitten clipboard -g picture.png + kitten clipboard -g picture.png # Copy an image to a file and text to STDOUT: - kitty +kitten clipboard -g picture.png /dev/stdout + kitten clipboard -g picture.png /dev/stdout # List the formats available on the system clipboard - kitty +kitten clipboard -g -m . /dev/stdout + kitten clipboard -g -m . /dev/stdout ''' usage = '[files to copy to/from]' diff --git a/kittens/hints/main.py b/kittens/hints/main.py index 0ffeda3d3..cfb678fa3 100644 --- a/kittens/hints/main.py +++ b/kittens/hints/main.py @@ -134,7 +134,7 @@ window, :code:`window` a new kitty window, :code:`tab` a new tab, :code:`os_window` a new OS window and :code:`background` run in the background. The actual action is whatever arguments are provided to the kitten, for example: -:code:`kitty +kitten hints --type=linenum --linenum-action=tab vim +{line} {path}` +:code:`kitten hints --type=linenum --linenum-action=tab vim +{line} {path}` will open the matched path at the matched line number in vim in a new kitty tab. Note that in order to use :option:`--program` to copy or paste the provided arguments, you need to use the special value :code:`self`. diff --git a/kittens/icat/main.py b/kittens/icat/main.py index 984d9c6af..487a0109d 100644 --- a/kittens/icat/main.py +++ b/kittens/icat/main.py @@ -75,7 +75,7 @@ detecting image display support. --print-window-size type=bool-set Print out the window size as <:italic:`width`>x<:italic:`height`> (in pixels) and quit. This is a -convenience method to query the window size if using :code:`kitty +kitten icat` +convenience method to query the window size if using :code:`kitten icat` from a scripting language that cannot make termios calls. diff --git a/kitty/open_actions.py b/kitty/open_actions.py index 4ba833a46..9b1a1d567 100644 --- a/kitty/open_actions.py +++ b/kitty/open_actions.py @@ -267,7 +267,7 @@ action launch --type=os-window $EDITOR $FILE_PATH # Open image files with icat protocol file mime image/* -action launch --type=os-window kitty +kitten icat --hold $FILE_PATH +action launch --type=os-window kitten icat --hold $FILE_PATH # Open ssh URLs with ssh command protocol ssh diff --git a/kitty/options/definition.py b/kitty/options/definition.py index 64dd26af5..75749d2c2 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -4111,7 +4111,7 @@ This will send "Special text" when you press the :kbd:`Ctrl+Alt+A` key combination. The text to be sent decodes :link:`ANSI C escapes ` so you can use escapes like :code:`\\\\e` to send control codes or :code:`\\\\u21fb` to send Unicode characters (or you can just input the Unicode characters directly as -UTF-8 text). You can use ``kitty +kitten show_key`` to get the key escape +UTF-8 text). You can use ``kitten show_key`` to get the key escape codes you want to emulate. The first argument to :code:`send_text` is the keyboard modes in which to