return { createCommand = function(COMMANDS) local selectedCommand = vim.fn.input('Enter a command: ') local selectedDescription = vim.fn.input('Name the command: ') COMMANDS[selectedDescription] = { command = function() return selectedCommand end, description = function() return selectedDescription end } return COMMANDS[selectedDescription] end }