summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-05-14 01:30:36 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-05-14 01:54:30 +0900
commit6432f00f0d026c61f683c83ded4d2e15317e927e (patch)
tree7dd666c371e04e5c91f704b8a6d48a9d452e5c82
parent4e9e842aa4df67051ce88963b0745679dbaeadb5 (diff)
0.52.10.52.1
-rw-r--r--CHANGELOG.md5
-rwxr-xr-xinstall2
-rw-r--r--install.ps12
-rw-r--r--man/man1/fzf-tmux.12
-rw-r--r--man/man1/fzf.12
-rw-r--r--plugin/fzf.vim2
-rw-r--r--src/util/util_windows.go7
7 files changed, 16 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4f6d2602..8a094afe 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,11 @@
CHANGELOG
=========
+0.52.1
+------
+- Fixed a critical bug in the Windows version
+ - Windows users are strongly encouraged to upgrade to this version
+
0.52.0
------
- Added `--highlight-line` to highlight the whole current line (à la `set cursorline` of Vim)
diff --git a/install b/install
index 1b46d405..cadfa6e0 100755
--- a/install
+++ b/install
@@ -2,7 +2,7 @@
set -u
-version=0.52.0
+version=0.52.1
auto_completion=
key_bindings=
update_config=2
diff --git a/install.ps1 b/install.ps1
index acd33b05..090bb5ed 100644
--- a/install.ps1
+++ b/install.ps1
@@ -1,4 +1,4 @@
-$version="0.52.0"
+$version="0.52.1"
$fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition
diff --git a/man/man1/fzf-tmux.1 b/man/man1/fzf-tmux.1
index 15e66aa1..11161e48 100644
--- a/man/man1/fzf-tmux.1
+++ b/man/man1/fzf-tmux.1
@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
..
-.TH fzf-tmux 1 "May 2024" "fzf 0.52.0" "fzf-tmux - open fzf in tmux split pane"
+.TH fzf-tmux 1 "May 2024" "fzf 0.52.1" "fzf-tmux - open fzf in tmux split pane"
.SH NAME
fzf-tmux - open fzf in tmux split pane
diff --git a/man/man1/fzf.1 b/man/man1/fzf.1
index 6102023f..513ffc3a 100644
--- a/man/man1/fzf.1
+++ b/man/man1/fzf.1
@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
..
-.TH fzf 1 "May 2024" "fzf 0.52.0" "fzf - a command-line fuzzy finder"
+.TH fzf 1 "May 2024" "fzf 0.52.1" "fzf - a command-line fuzzy finder"
.SH NAME
fzf - a command-line fuzzy finder
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index ee0e41bb..735571cf 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -95,7 +95,7 @@ function! s:shellesc_cmd(arg)
let e .= c
endfor
let e .= repeat('\', slashes) .'"'
- return e
+ return substitute(substitute(e, '[&|<>()^!"]', '^&', 'g'), '%', '%%', 'g')
endfunction
function! fzf#shellescape(arg, ...)
diff --git a/src/util/util_windows.go b/src/util/util_windows.go
index f29e33be..3a4ab570 100644
--- a/src/util/util_windows.go
+++ b/src/util/util_windows.go
@@ -7,6 +7,7 @@ import (
"os"
"os/exec"
"path/filepath"
+ "regexp"
"strings"
"sync/atomic"
"syscall"
@@ -20,6 +21,8 @@ const (
shellTypePowerShell
)
+var escapeRegex = regexp.MustCompile(`[&|<>()^%!"]`)
+
type Executor struct {
shell string
shellType shellType
@@ -131,7 +134,9 @@ func escapeArg(s string) string {
b = append(b, '\\')
}
b = append(b, '"')
- return string(b)
+ return escapeRegex.ReplaceAllStringFunc(string(b), func(match string) string {
+ return "^" + match
+ })
}
func (x *Executor) QuoteEntry(entry string) string {