summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-10-04 02:17:36 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-10-04 02:17:36 +0900
commit3222d62ddf0b8072e43ac2b5abd52b1d6d3f6eef (patch)
tree4be529f641ed0307e79363a1f736ed8f3b6b149d
parentaeb957a2852555b2fce037aac4c3cb2b9d2f5c39 (diff)
0.15.40.15.4
-rw-r--r--CHANGELOG.md13
-rw-r--r--README.md20
-rwxr-xr-xinstall4
-rw-r--r--man/man1/fzf-tmux.12
-rw-r--r--man/man1/fzf.124
-rw-r--r--src/constants.go2
6 files changed, 43 insertions, 22 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f5b9954e..7bbe4f41 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,19 @@
CHANGELOG
=========
+0.15.4
+------
+- Added support for range expression in preview and execute action
+ - e.g. `ls -l | fzf --preview="echo user={3} when={-4..-2}; cat {-1}" --header-lines=1`
+ - `{q}` will be replaced to the single-quoted string of the current query
+- Fixed to properly handle unicode whitespace characters
+- Display scroll indicator in preview window
+- Inverse search term will use exact matcher by default
+ - This is a breaking change, but I believe it makes much more sense. It is
+ almost impossible to predict which entries will be filtered out due to
+ a fuzzy inverse term. You can still perform inverse-fuzzy-match by
+ prepending `!'` to the term.
+
0.15.3
------
- Added support for more ANSI attributes: dim, underline, blink, and reverse
diff --git a/README.md b/README.md
index 997ec7c7..a5d2e954 100644
--- a/README.md
+++ b/README.md
@@ -113,16 +113,16 @@ vim $(fzf)
Unless otherwise specified, fzf starts in "extended-search mode" where you can
type in multiple search terms delimited by spaces. e.g. `^music .mp3$ sbtrkt
-!rmx`
-
-| Token | Match type | Description |
-| -------- | -------------------- | -------------------------------- |
-| `sbtrkt` | fuzzy-match | Items that match `sbtrkt` |
-| `^music` | prefix-exact-match | Items that start with `music` |
-| `.mp3$` | suffix-exact-match | Items that end with `.mp3` |
-| `'wild` | exact-match (quoted) | Items that include `wild` |
-| `!rmx` | inverse-fuzzy-match | Items that do not match `rmx` |
-| `!'fire` | inverse-exact-match | Items that do not include `fire` |
+!fire`
+
+| Token | Match type | Description |
+| -------- | -------------------------- | --------------------------------- |
+| `sbtrkt` | fuzzy-match | Items that match `sbtrkt` |
+| `^music` | prefix-exact-match | Items that start with `music` |
+| `.mp3$` | suffix-exact-match | Items that end with `.mp3` |
+| `'wild` | exact-match (quoted) | Items that include `wild` |
+| `!fire` | inverse-exact-match | Items that do not include `fire` |
+| `!.mp3$` | inverse-suffix-exact-match | Items that do not end with `.mp3` |
If you don't prefer fuzzy matching and do not wish to "quote" every word,
start fzf with `-e` or `--exact` option. Note that when `--exact` is set,
diff --git a/install b/install
index 3b7ca050..7a5b7972 100755
--- a/install
+++ b/install
@@ -2,8 +2,8 @@
set -u
-[[ "$@" =~ --pre ]] && version=0.15.3 pre=1 ||
- version=0.15.3 pre=0
+[[ "$@" =~ --pre ]] && version=0.15.4 pre=1 ||
+ version=0.15.4 pre=0
auto_completion=
key_bindings=
diff --git a/man/man1/fzf-tmux.1 b/man/man1/fzf-tmux.1
index 6c2557dc..b01f0b7b 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 "Sep 2016" "fzf 0.15.3" "fzf-tmux - open fzf in tmux split pane"
+.TH fzf-tmux 1 "Oct 2016" "fzf 0.15.4" "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 2c399a13..96167014 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 "Sep 2016" "fzf 0.15.3" "fzf - a command-line fuzzy finder"
+.TH fzf 1 "Oct 2016" "fzf 0.15.4" "fzf - a command-line fuzzy finder"
.SH NAME
fzf - a command-line fuzzy finder
@@ -232,11 +232,17 @@ automatically truncated when the number of the lines exceeds the value.
.TP
.BI "--preview=" "COMMAND"
Execute the given command for the current line and display the result on the
-preview window. \fB{}\fR is the placeholder for the quoted string of the
-current line.
+preview window. \fB{}\fR in the command is the placeholder that is replaced to
+the single-quoted string of the current line. To transform the replacement
+string, specify field index expressions between the braces (See \fBFIELD INDEX
+EXPRESSION\fR for the details). Also, \fB{q}\fR is replaced to the current
+query string.
.RS
e.g. \fBfzf --preview="head -$LINES {}"\fR
+ \fBls -l | fzf --preview="echo user={3} when={-4..-2}; cat {-1}" --header-lines=1\fR
+
+Note that you can escape a placeholder pattern by prepending a backslash.
.RE
.TP
.BI "--preview-window=" "[POSITION][:SIZE[%]][:hidden]"
@@ -358,7 +364,7 @@ with the given string. An anchored-match term is also an exact-match term.
.SS Negation
If a term is prefixed by \fB!\fR, fzf will exclude the lines that satisfy the
-term from the result.
+term from the result. In this case, fzf performs exact match by default.
.SS Exact-match by default
If you don't prefer fuzzy matching and do not wish to "quote" (prefixing with
@@ -460,9 +466,11 @@ binding \fBenter\fR key to \fBless\fR command like follows.
\fBfzf --bind "enter:execute(less {})"\fR
-\fB{}\fR is the placeholder for the quoted string of the current line.
-If the command contains parentheses, you can use any of the following
-alternative notations to avoid parse errors.
+You can use the same placeholder expressions as in \fB--preview\fR.
+
+If the command contains parentheses, fzf may fail to parse the expression. In
+that case, you can use any of the following alternative notations to avoid
+parse errors.
\fBexecute[...]\fR
\fBexecute~...~\fR
@@ -481,7 +489,7 @@ alternative notations to avoid parse errors.
.RS
This is the special form that frees you from parse errors as it does not expect
the closing character. The catch is that it should be the last one in the
-comma-separated list.
+comma-separated list of key-action pairs.
.RE
\fBexecute-multi(...)\fR is an alternative action that executes the command
diff --git a/src/constants.go b/src/constants.go
index 35818cda..a96c362c 100644
--- a/src/constants.go
+++ b/src/constants.go
@@ -8,7 +8,7 @@ import (
const (
// Current version
- version = "0.15.3"
+ version = "0.15.4"
// Core
coordinatorDelayMax time.Duration = 100 * time.Millisecond