Add :Chmod command to change mode bits
This commit is contained in:
parent
eee4944354
commit
2098949e9c
@ -99,7 +99,13 @@ end, {
|
||||
end
|
||||
})
|
||||
|
||||
-- TODO: :Chmod
|
||||
-- :Chmod change file mode bits
|
||||
if vim.fn.executable('chmod') == 1 then
|
||||
vim.api.nvim_create_user_command('Chmod', function(opts)
|
||||
local file = vim.fn.expand('%:p')
|
||||
vim.fn.system('chmod ' .. opts.args .. ' ' .. file)
|
||||
end, { nargs = '+' })
|
||||
end
|
||||
|
||||
-- :Mkdir create a directory, bang to create intermediate directories
|
||||
vim.api.nvim_create_user_command('Mkdir', function(opts)
|
||||
|
Loading…
x
Reference in New Issue
Block a user