1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-09-22 10:27:12 +03:00

rc/ranger: use $kak_hook_param_capture_N

This commit is contained in:
Alex Leferry 2 2017-04-01 22:46:31 +02:00
parent 055ed5ff7e
commit 08c4fac07f

View File

@ -4,7 +4,7 @@
def ranger-open-on-edit-directory \
-docstring 'Start the ranger file system explorer when trying to edit a directory' %{
hook global RuntimeError "\d+:\d+: '\w+' (.*): is a directory" %{ %sh{
directory=$(expr $kak_hook_param : "[0-9]*:[0-9]*: '[a-z]*' \\(.*\\): is a directory")
directory=$kak_hook_param_capture_1
echo ranger $directory
}}
}