-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathff.1
136 lines (128 loc) · 2.11 KB
/
ff.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
.TH FF 1
.CT 1 files prog_other
.SH NAME
ff \- fuzzy-find: fuzzy completion for finding files
.SH SYNOPSIS
.B ff
[
.BI \-dDhilRt
]
[
.BI \-c
.I char
]
[
.BI \-n
.I count
]
[
.BI \-r
.I root
]
.I pattern
.SH DESCRIPTION
.I ff
searches a directory tree with basic
.I fuzzy-completion.
I wrote it because
.BI "find \-name \'blah\'"
only scans filenames (not their parent directories), and
regular expressions for fuzzy completion are cumbersome.
Searching for
.I "aeiou"
will print any paths that match the re
.BI '.*a.*e.*i.*o.*u.*'.
By default,
.I ff
searches recursively from the current directory, but its
search root can be set with the
.I '-r'
option.
.BI ff
query query strings are not regular expressions - characters such as
.I '.'
and
.I '-'
match literally. Any sections enclosed in
.I '/'s
will be required to match within the same path element, and the
consecutive match character (default
.I '='
) toggles exact matching.
(The default is '=' because it doesn't mean anything in
basic REs and it's usually unshifted on keyboards.)
.SH OPTIONS
.TP
.BI \-c " CHAR"
char to toggle
.I Consecutive
match (default:
.I '='
)
.TP
.BI \-d
show
.I Dotfiles
.TP
.BI \-D
only show
.I Directories
.TP
.BI \-h
show this
.I Help
.TP
.BI \-i
.I case-Insensitive
search
.TP
.BI \-l
follow
.I Links
(warning: no cycle detection)
.TP
.BI \-r " ROOT"
set search
.I Root
(default: .)
.TP
.BI \-R
don't recurse subdirectories
.TP
.BI \-t
run
.I Tests
and exit
.SH EXAMPLES
.TP
.EX
ff aeiou
.EE
This matches both
.BI '~/and/the/first/one/used.txt'
and
.BI '~/after_the_furious_ultimatum.txt',
because the characters 'a', 'e', 'i', 'o', and 'u' appear sequentially.
.TP
.EX
ff a/e/i/o/u
.EE
This only matches
.BI '~/and/the/first/one/used.txt',
since the
.I '/'s
require each vowel to appear in distinct directory elements.
.TP
.EX
ff ae=iou=
.EE
This would only match
.I '~/after_the_furious_ultimatum.txt',
since it matches an 'a', then an 'e', then the '='s specify a
.B consecutive
"iou" string. (The second '=' toggles off the consecutive match,
but is optional here since it is at the end of the pattern.)
.SH SEE ALSO
.IR find (1)
.SH BUGS
Not a web framework.