summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/man1/fzf.12
-rw-r--r--plugin/fzf.vim13
-rw-r--r--src/util/util_windows.go4
3 files changed, 4 insertions, 15 deletions
diff --git a/man/man1/fzf.1 b/man/man1/fzf.1
index 50357030..323d3ead 100644
--- a/man/man1/fzf.1
+++ b/man/man1/fzf.1
@@ -821,7 +821,7 @@ e.g. \fBfzf --multi | fzf --sync\fR
.B "--with-shell=STR"
Shell command and flags to start child processes with. On *nix Systems, the
default value is \fB$SHELL -c\fR if \fB$SHELL\fR is set, otherwise \fBsh -c\fR.
-On Windows, the default value is \fBcmd /v:on/s/c\fR when \fB$SHELL\fR is not
+On Windows, the default value is \fBcmd /s/c\fR when \fB$SHELL\fR is not
set.
.RS
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 4a1ca0e5..b73f2aaa 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -59,12 +59,9 @@ if s:is_win
return iconv(a:str, &encoding, 'cp'.s:codepage)
endfunction
function! s:wrap_cmds(cmds)
- return map([
- \ '@echo off',
- \ 'setlocal enabledelayedexpansion']
+ return map(['@echo off']
\ + (has('gui_running') ? ['set TERM= > nul'] : [])
- \ + (type(a:cmds) == type([]) ? a:cmds : [a:cmds])
- \ + ['endlocal'],
+ \ + (type(a:cmds) == type([]) ? a:cmds : [a:cmds]),
\ '<SID>enc_to_cp(v:val."\r")')
endfunction
else
@@ -83,8 +80,6 @@ else
endfunction
endif
-let s:cmd_control_chars = ['&', '|', '<', '>', '(', ')', '@', '^', '!']
-
function! s:shellesc_cmd(arg)
let e = '"'
let slashes = 0
@@ -94,10 +89,6 @@ function! s:shellesc_cmd(arg)
elseif c ==# '"'
let e .= repeat('\', slashes + 1)
let slashes = 0
- elseif c ==# '%'
- let e .= '%'
- elseif index(s:cmd_control_chars, c) >= 0
- let e .= '^'
else
let slashes = 0
endif
diff --git a/src/util/util_windows.go b/src/util/util_windows.go
index 9d51cc97..7bbf6ee7 100644
--- a/src/util/util_windows.go
+++ b/src/util/util_windows.go
@@ -42,7 +42,7 @@ func NewExecutor(withShell string) *Executor {
args = args[1:]
} else if strings.HasPrefix(basename, "cmd") {
shellType = shellTypeCmd
- args = []string{"/v:on/s/c"}
+ args = []string{"/s/c"}
} else if strings.HasPrefix(basename, "pwsh") || strings.HasPrefix(basename, "powershell") {
shellType = shellTypePowerShell
args = []string{"-NoProfile", "-Command"}
@@ -119,8 +119,6 @@ func escapeArg(s string) string {
slashes = 0
case '\\':
slashes++
- case '&', '|', '<', '>', '(', ')', '@', '^', '%', '!':
- b = append(b, '^')
case '"':
for ; slashes > 0; slashes-- {
b = append(b, '\\')