Add auto-detection of OS and distro to scripts

This commit is contained in:
2025-10-06 00:45:59 -05:00
parent 05ca9cfb85
commit 0ad0691120
7 changed files with 56 additions and 64 deletions

View File

@@ -116,11 +116,11 @@ kmgAutocmd('LspAttach', {
-- telescope
local tscBuiltin = require('telescope.builtin')
local custom_tscope_grep = function()
tscBuiltin.grep_string({ search = vim.fn.input("grep > ")})
local custom_grep_str_w_regex = function()
tscBuiltin.grep_string({ search = vim.fn.input("grep > "), use_regex = true, additional_args = "-i", })
end
vim.keymap.set('n', '<leader>ft', tscBuiltin.live_grep, { desc = 'tscope find text, live_grep' })
vim.keymap.set('n', '<leader>fT', custom_tscope_grep, { desc = 'tscope find text, custom grep' })
vim.keymap.set('n', '<leader>fT', custom_grep_str_w_regex, { desc = 'tscope find text, static grep w/regex' })
vim.keymap.set('n', '<leader>fg', tscBuiltin.git_files, { desc = 'tscope find git-tracked files' })
vim.keymap.set('n', '<leader>ff', tscBuiltin.find_files, { desc = 'tscope find files' })
vim.keymap.set('n', '<leader>fb', tscBuiltin.buffers, { desc = 'tscope buffers' })