Avoid alias related complications with completion delegation for hyperlinked_grep

This commit is contained in:
Kovid Goyal
2020-10-06 13:53:41 +05:30
parent fb87fc32f0
commit f1552c8354

View File

@@ -42,10 +42,17 @@ You can now run searches with::
hg some-search-term
If you want to enable completion, for the kitten, you can delegate completion
to rg. For ZSH, you do that with::
to rg. For that, instead of using an alias create a simple wrapper script named
:file:`hg` somewhere in your ``PATH``:
compdef _rg kitty +kitten hyperlinked_grep
.. code-block:: sh
#!/bin/sh
exec kitty +kitten hyperlinked_grep "$@"
Then, for example, for ZSH, add the following to :file:`.zshrc`::
compdef _rg hg
To learn more about kitty's powerful framework for customizing URL click
actions, :doc:`see here <../open_actions>`.