no RuntimeError hook on kak . #1056

Open
Delapouite opened this Issue Dec 21, 2016 · 1 comment

Projects

None yet

2 participants

@Delapouite
Contributor

Hi.
ranger.kak provides the following hook:

hook global RuntimeError "\d+:\d+: '\w+' (.*): is a directory" %{ %sh{
    directory=$(expr $kak_hook_param : "[0-9]*:[0-9]*: '[a-z]*' \\(.*\\): is a directory")
   echo ranger $directory
}}

which is quite handy with the edit . command for example.

But typing kak . in the shell to open a fresh instance of kakoune does not trigger this RuntimeError hook, it only logs a similar startup_error to the debug buffer.

It would be great if the shell kak . command could also trigger the same RuntimeError as kakoune edit . command. This way, ranger would be automatically be opened at startup.

@lenormf
Contributor
lenormf commented Dec 22, 2016

Would it be better if ranger was spawned on BufCreate when the buffer points to a directory, and simply drop the error message when it's supposed to be displayed? Relying on the error format is not very robust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment