🪴 my neovim config:)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

plugin: add `Shell` command

robin 0f00c1b7 25c9fd92

+24
+24
config/plugin/shell.lua
··· 1 + if vim.g.loaded_shell then 2 + return 3 + end 4 + 5 + vim.g.loaded_shell = true 6 + 7 + vim.api.nvim_create_user_command("Shell", function(opts) 8 + opts.args = vim.trim(opts.args) 9 + if #vim.trim(opts.args) == 0 then 10 + return 11 + end 12 + 13 + vim.system({ vim.o.shell, vim.o.shellcmdflag, opts.args }, {}, function(o) 14 + if not o.code or o.code ~= 0 then 15 + vim.schedule(function() 16 + vim.notify(('command "%s" exited with code %d SIG%d'):format(opts.args, o.code, o.signal), vim.log.levels.WARN) 17 + end) 18 + end 19 + end) 20 + end, { 21 + nargs = "*", 22 + complete = "shellcmd", 23 + desc = "run shell command", 24 + })