summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2014-04-02 01:49:07 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2014-04-02 01:49:07 +0900
commitab9fbf196721c171d8ebe5545a074e500c6fb908 (patch)
tree7665a08d2121a9927886e5f79f4dc4b3b1a4127a /README.md
parent608ec2b806a9b6cad95cab78f3e5b4f8b4b2b743 (diff)
Allow --nth option to take multiple indexes (comma-separated)
Diffstat (limited to 'README.md')
-rw-r--r--README.md10
1 files changed, 7 insertions, 3 deletions
diff --git a/README.md b/README.md
index 3730d83e..db02bec8 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,8 @@ usage: fzf [options]
-e, --extended-exact Extended-search mode (exact match)
-q, --query=STR Initial query
-f, --filter=STR Filter mode. Do not start interactive finder.
- -n, --nth=[-]N Match only in the N-th token of the item
+ -n, --nth=[-]N[,..] Comma-separated list of field indexes for limiting
+ search scope (positive or negative integers)
-d, --delimiter=STR Field delimiter regex for --nth (default: AWK-style)
-s, --sort=MAX Maximum number of matched items to sort (default: 1000)
+s, --no-sort Do not sort the result. Keep the sequence unchanged.
@@ -186,8 +187,11 @@ fco() {
ftags() {
local line
[ -e tags ] &&
- line=$(grep -v "^!" tags | cut -f1-3 | cut -c1-80 | fzf --nth=1) &&
- $EDITOR $(cut -f2 <<< "$line")
+ line=$(
+ awk 'BEGIN { FS="\t" } !/^!/ {print toupper($4)"\t"$1"\t"$2"\t"$3}' tags |
+ cut -c1-80 | fzf --nth=1,2
+ ) && $EDITOR $(cut -f3 <<< "$line") -c "set nocst" \
+ -c "silent tag $(cut -f2 <<< "$line")"
}
# fq1 [QUERY]