mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-12 21:33:49 -05:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6432f00f0d | ||
|
|
4e9e842aa4 | ||
|
|
07880ca441 |
@@ -1,6 +1,11 @@
|
|||||||
CHANGELOG
|
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
|
0.52.0
|
||||||
------
|
------
|
||||||
- Added `--highlight-line` to highlight the whole current line (à la `set cursorline` of Vim)
|
- Added `--highlight-line` to highlight the whole current line (à la `set cursorline` of Vim)
|
||||||
|
|||||||
2
install
2
install
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
version=0.52.0
|
version=0.52.1
|
||||||
auto_completion=
|
auto_completion=
|
||||||
key_bindings=
|
key_bindings=
|
||||||
update_config=2
|
update_config=2
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
$version="0.52.0"
|
$version="0.52.1"
|
||||||
|
|
||||||
$fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition
|
$fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
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
|
.SH NAME
|
||||||
fzf-tmux - open fzf in tmux split pane
|
fzf-tmux - open fzf in tmux split pane
|
||||||
|
|||||||
@@ -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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
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
|
.SH NAME
|
||||||
fzf - a command-line fuzzy finder
|
fzf - a command-line fuzzy finder
|
||||||
@@ -46,10 +46,10 @@ it with \fB+x\fR or \fB--no-extended\fR.
|
|||||||
.B "-e, --exact"
|
.B "-e, --exact"
|
||||||
Enable exact-match
|
Enable exact-match
|
||||||
.TP
|
.TP
|
||||||
.B "-i"
|
.B "-i, --ignore-case"
|
||||||
Case-insensitive match (default: smart-case match)
|
Case-insensitive match (default: smart-case match)
|
||||||
.TP
|
.TP
|
||||||
.B "+i"
|
.B "+i, --no-ignore-case"
|
||||||
Case-sensitive match
|
Case-sensitive match
|
||||||
.TP
|
.TP
|
||||||
.B "--literal"
|
.B "--literal"
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ function! s:shellesc_cmd(arg)
|
|||||||
let e .= c
|
let e .= c
|
||||||
endfor
|
endfor
|
||||||
let e .= repeat('\', slashes) .'"'
|
let e .= repeat('\', slashes) .'"'
|
||||||
return e
|
return substitute(substitute(e, '[&|<>()^!"]', '^&', 'g'), '%', '%%', 'g')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! fzf#shellescape(arg, ...)
|
function! fzf#shellescape(arg, ...)
|
||||||
|
|||||||
@@ -119,8 +119,8 @@ _fzf_opts_completion() {
|
|||||||
+s --no-sort
|
+s --no-sort
|
||||||
--track
|
--track
|
||||||
--tac
|
--tac
|
||||||
-i
|
-i --ignore-case
|
||||||
+i
|
+i --no-ignore-case
|
||||||
-m --multi
|
-m --multi
|
||||||
--ansi
|
--ansi
|
||||||
--no-mouse
|
--no-mouse
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ const Usage = `usage: fzf [options]
|
|||||||
-x, --extended Extended-search mode
|
-x, --extended Extended-search mode
|
||||||
(enabled by default; +x or --no-extended to disable)
|
(enabled by default; +x or --no-extended to disable)
|
||||||
-e, --exact Enable Exact-match
|
-e, --exact Enable Exact-match
|
||||||
-i Case-insensitive match (default: smart-case match)
|
-i, --ignore-case Case-insensitive match (default: smart-case match)
|
||||||
+i Case-sensitive match
|
+i, --no-ignore-case Case-sensitive match
|
||||||
--scheme=SCHEME Scoring scheme [default|path|history]
|
--scheme=SCHEME Scoring scheme [default|path|history]
|
||||||
--literal Do not normalize latin script letters before matching
|
--literal Do not normalize latin script letters before matching
|
||||||
-n, --nth=N[,..] Comma-separated list of field index expressions
|
-n, --nth=N[,..] Comma-separated list of field index expressions
|
||||||
@@ -1914,9 +1914,9 @@ func parseOptions(opts *Options, allArgs []string) error {
|
|||||||
opts.Tac = true
|
opts.Tac = true
|
||||||
case "--no-tac":
|
case "--no-tac":
|
||||||
opts.Tac = false
|
opts.Tac = false
|
||||||
case "-i":
|
case "-i", "--ignore-case":
|
||||||
opts.Case = CaseIgnore
|
opts.Case = CaseIgnore
|
||||||
case "+i":
|
case "+i", "--no-ignore-case":
|
||||||
opts.Case = CaseRespect
|
opts.Case = CaseRespect
|
||||||
case "-m", "--multi":
|
case "-m", "--multi":
|
||||||
if opts.Multi, err = optionalNumeric(allArgs, &i, maxMulti); err != nil {
|
if opts.Multi, err = optionalNumeric(allArgs, &i, maxMulti); err != nil {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"syscall"
|
"syscall"
|
||||||
@@ -20,6 +21,8 @@ const (
|
|||||||
shellTypePowerShell
|
shellTypePowerShell
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var escapeRegex = regexp.MustCompile(`[&|<>()^%!"]`)
|
||||||
|
|
||||||
type Executor struct {
|
type Executor struct {
|
||||||
shell string
|
shell string
|
||||||
shellType shellType
|
shellType shellType
|
||||||
@@ -131,7 +134,9 @@ func escapeArg(s string) string {
|
|||||||
b = append(b, '\\')
|
b = append(b, '\\')
|
||||||
}
|
}
|
||||||
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 {
|
func (x *Executor) QuoteEntry(entry string) string {
|
||||||
|
|||||||
Reference in New Issue
Block a user