aboutsummaryrefslogtreecommitdiffstats
path: root/nvim/.config
diff options
context:
space:
mode:
authorPeter Son Struschka <me@peter-struschka.com>2019-07-30 12:46:57 +0700
committerPeter Son Struschka <me@peter-struschka.com>2019-07-30 12:46:57 +0700
commit0510b1953bce39bdc6a2eb1baad5ef7afdf421fc (patch)
treea13652a09d2df14970bcf4e3c8787852433975cb /nvim/.config
parent874fa62b01dd21cc26e17a3ce742996a8450645e (diff)
downloaddotfiles-0510b1953bce39bdc6a2eb1baad5ef7afdf421fc.tar.gz
dotfiles-0510b1953bce39bdc6a2eb1baad5ef7afdf421fc.tar.bz2
dotfiles-0510b1953bce39bdc6a2eb1baad5ef7afdf421fc.tar.lz
dotfiles-0510b1953bce39bdc6a2eb1baad5ef7afdf421fc.tar.xz
dotfiles-0510b1953bce39bdc6a2eb1baad5ef7afdf421fc.tar.zst
dotfiles-0510b1953bce39bdc6a2eb1baad5ef7afdf421fc.zip
cleaned makefile, added doom-emacs and other small fixes
Diffstat (limited to 'nvim/.config')
-rw-r--r--nvim/.config/nvim/autoload/plug.vim14
1 files changed, 6 insertions, 8 deletions
diff --git a/nvim/.config/nvim/autoload/plug.vim b/nvim/.config/nvim/autoload/plug.vim
index 2c26070..afb1772 100644
--- a/nvim/.config/nvim/autoload/plug.vim
+++ b/nvim/.config/nvim/autoload/plug.vim
@@ -794,9 +794,7 @@ endfunction
function! s:chsh(swap)
let prev = [&shell, &shellcmdflag, &shellredir]
- if s:is_win
- set shell=cmd.exe shellcmdflag=/c shellredir=>%s\ 2>&1
- elseif a:swap
+ if !s:is_win && a:swap
set shell=sh shellredir=>%s\ 2>&1
endif
return prev
@@ -811,7 +809,7 @@ function! s:bang(cmd, ...)
if s:is_win
let batchfile = tempname().'.bat'
call writefile(["@echo off\r", cmd . "\r"], batchfile)
- let cmd = batchfile
+ let cmd = s:shellesc(expand(batchfile))
endif
let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%')
execute "normal! :execute g:_plug_bang\<cr>\<cr>"
@@ -1210,7 +1208,7 @@ function! s:spawn(name, cmd, opts)
let cmd = has_key(a:opts, 'dir') ? s:with_cd(a:cmd, a:opts.dir) : a:cmd
if !empty(job.batchfile)
call writefile(["@echo off\r", cmd . "\r"], job.batchfile)
- let cmd = job.batchfile
+ let cmd = s:shellesc(expand(job.batchfile))
endif
let argv = add(s:is_win ? ['cmd', '/c'] : ['sh', '-c'], cmd)
@@ -2037,9 +2035,9 @@ function! s:system(cmd, ...)
if s:is_win
let batchfile = tempname().'.bat'
call writefile(["@echo off\r", cmd . "\r"], batchfile)
- let cmd = batchfile
+ let cmd = s:shellesc(expand(batchfile))
endif
- return system(s:is_win ? '('.cmd.')' : cmd)
+ return system(cmd)
finally
let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd]
if s:is_win
@@ -2371,7 +2369,7 @@ function! s:preview_commit()
if s:is_win
let batchfile = tempname().'.bat'
call writefile(["@echo off\r", cmd . "\r"], batchfile)
- let cmd = batchfile
+ let cmd = expand(batchfile)
endif
execute 'silent %!' cmd
finally