diff options
| author | Jacob McDonnell <jacob@simplelittledream.com> | 2022-10-26 11:10:13 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@simplelittledream.com> | 2022-10-26 11:10:13 -0400 |
| commit | 6b6e91707ecf621a0bedad154351db8f1ccc2123 (patch) | |
| tree | e0bed306b683c344e3f429817b1ef04daba1c2f6 /.config/micro/plug/fzf/main.lua | |
| parent | 161a1bfb0b3e75e9f5241cd7dd8aafec455a67d5 (diff) | |
Working on merging to one branch
Diffstat (limited to '.config/micro/plug/fzf/main.lua')
| -rw-r--r-- | .config/micro/plug/fzf/main.lua | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/.config/micro/plug/fzf/main.lua b/.config/micro/plug/fzf/main.lua deleted file mode 100644 index fbdcd97..0000000 --- a/.config/micro/plug/fzf/main.lua +++ /dev/null @@ -1,38 +0,0 @@ -VERSION = "1.1.1" - -local micro = import("micro") -local shell = import("micro/shell") -local config = import("micro/config") -local buffer = import("micro/buffer") - -function fzf(bp) - if shell.TermEmuSupported then - local err = shell.RunTermEmulator(bp, "fzf", false, true, fzfOutput, {bp}) - if err ~= nil then - micro.InfoBar():Error(err) - end - else - local output, err = shell.RunInteractiveShell("fzf", false, true) - if err ~= nil then - micro.InfoBar():Error(err) - else - fzfOutput(output, {bp}) - end - end -end - -function fzfOutput(output, args) - local bp = args[1] - local strings = import("strings") - output = strings.TrimSpace(output) - if output ~= "" then - local buf, err = buffer.NewBufferFromFile(output) - if err == nil then - bp:OpenBuffer(buf) - end - end -end - -function init() - config.MakeCommand("fzf", fzf, config.NoComplete) -end |
