2026-06-16 16:26:28 +01:00
|
|
|
local M = {}
|
|
|
|
|
|
|
|
|
|
function M.open(name)
|
|
|
|
|
local titles = {
|
|
|
|
|
zsh = 'ZSH Cheat Sheet',
|
|
|
|
|
bash = 'Bash Cheat Sheet',
|
|
|
|
|
regex = 'RegExp Cheat Sheet',
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
local path = vim.fn.stdpath 'config' .. '/cheatsheets/' .. name .. '.md'
|
|
|
|
|
print('Opening cheat sheet: ' .. path)
|
|
|
|
|
|
|
|
|
|
require('../helpers').open_file_modal(path, titles[name] or name)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return M
|
2026-09-11 18:22:12 +01:00
|
|
|
|