diff options
| author | Alex Leferry 2 <alexherbo2@gmail.com> | 2020-09-06 16:17:35 +0200 |
|---|---|---|
| committer | Alex Leferry 2 <alexherbo2@gmail.com> | 2020-09-06 16:22:48 +0200 |
| commit | 49b47844e958c3594e61e1249444796a7eea7aac (patch) | |
| tree | cec81a7c3deb9a1667c4ebced8d2baca2f9b9815 /rc | |
| parent | 56e78b346116ee9b86237157a43fc7aaa397cde7 (diff) | |
Let users require modules
Diffstat (limited to 'rc')
| -rw-r--r-- | rc/connect.kak | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/rc/connect.kak b/rc/connect.kak index d9efaf6..d0aebb4 100644 --- a/rc/connect.kak +++ b/rc/connect.kak @@ -4,7 +4,7 @@ declare-option -hidden str connect_modules_path "%opt{connect_root_path}/connect # Default modules hook global ModuleLoaded connect %{ - connect-require fifo + require-module connect-fifo } provide-module connect %{ @@ -42,15 +42,6 @@ provide-module connect %{ # Initialize the option with the user config paths set-option global connect_paths "%val{config}/connect/aliases" "%val{config}/connect/commands" - # Require modules - define-command connect-require -params 1 -shell-script-candidates %(find "$kak_opt_connect_modules_path" -type f -name '*.kak' -exec basename '{}' .kak ';') -docstring 'Require connect module' %{ - # Handle “Already defined module” - try %{ - source "%opt{connect_modules_path}/%arg{1}/%arg{1}.kak" - } - require-module "connect-%arg{1}" - } - # Commands define-command connect-terminal -params .. -shell-completion -docstring 'Open a new terminal' %{ terminal sh -c %{ @@ -142,5 +133,3 @@ provide-module connect %{ alias global $ connect-shell alias global & connect-detach } - -require-module connect |
