Allow defining aliases for more general actions, not just kittens

Fixes #4260
This commit is contained in:
Kovid Goyal
2021-11-22 19:52:43 +05:30
parent 727c69ffdd
commit aa4fa4cc85
16 changed files with 370 additions and 281 deletions

View File

@@ -210,6 +210,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
--program` option work when using the ``self``
:option:`kitty +kitten hints --linenum-action` (:iss:`3931`)
- Allow defining aliases for more general actions, not just kittens
(:pull:`4260`)
0.22.2 [2021-08-02]
----------------------

View File

@@ -38,6 +38,18 @@ To pass the contents of the current screen and scrollback to the started process
There are many more powerful options, refer to the complete list below.
.. note::
To avoid duplicating launch actions with frequently used parameters, you can
use :opt:`action_alias` to define launch action aliases. For example::
action_alias launch_tab launch --cwd=current --type=tab
map f1 launch_tab vim
map f2 launch_tab emacs
The :kbd:`F1` key will now open vim in a new tab with the current windows
working directory
The piping environment
--------------------------

View File

@@ -58,6 +58,12 @@ some special variables, documented below:
``FRAGMENT``
The fragment (unquoted), if any of the URL or the empty string.
.. note::
You can use the :opt:`action_alias` option just as in kitty.conf to
define aliases for frequently used actions.
.. _matching_criteria:
Matching criteria