Add a few more special command line arguments for launch

Now all ``KITTY_PIPE_DATA`` is also available via command line argument substitution
Fixes #3593
This commit is contained in:
Kovid Goyal
2021-05-09 07:45:53 +05:30
parent 63d76ee837
commit 9a6c2aa1ea
4 changed files with 67 additions and 17 deletions

View File

@@ -18,6 +18,10 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- macOS: When the Apple Color Emoji font lacks an emoji glyph search for it in other
installed fonts (:iss:`3591`)
- Add a few more special commandline arguments for the launch command. Now all
``KITTY_PIPE_DATA`` is also available via command line argument substitution
(:iss:`3593`)
0.20.3 [2021-05-06]
----------------------

View File

@@ -54,9 +54,34 @@ Special arguments
-------------------
There are a few special placeholder arguments that can be specified as part of
the command line. Namely ``@selection`` which is replaced by the current
selection and ``@active-kitty-window-id`` which is replaced by the id of the
currently active kitty window. For example::
the command line:
``@selection``
replaced by the currently selected text
``@active-kitty-window-id``
replaced by the id of the currently active kitty window
``@line-count``
replaced by the number of lines in STDIN. Only present when passing some
data to STDIN
``@input-line-number``
replaced the number of lines a pager should scroll to match the current
scroll position in kitty. See :opt:`scrollback_pager` for details
``@scrolled-by``
replaced by the number of lines kitty is currently scrolled by
``@cursor-x``
replaced by the current cursor x position
``@cursor-y``
replaced by the current cursor y position
For example::
map f1 launch my-program @active-kitty-window-id