forked from denisidoro/navi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docstring.txt
61 lines (49 loc) · 2.55 KB
/
docstring.txt
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
An interactive cheatsheet tool for the command-line
Usage:
navi [command] [<args>...] [options]
Commands:
query <cmd> Pre-filter results
search <cmd> Search for cheatsheets on online repositories
best <cmd> <args>... Considers the best match
widget <shell> Prints the path for the widget file to be sourced
Options:
--print Prevent script execution
--path List of :-separated paths to look for cheats
--no-interpolation Prevent argument interpolation
--no-preview Hide command preview window
--no-autoselect Prevents autoselecting single entries in a list
--fzf-overrides Overrides for fzf commands [default: --with-nth 3,1,2 --exact]
--col-widths Set column widths [default: 15,50,0]
--col-colors Set color ANSI codes [default: 90,34,37]
Keybindings:
Ctrl-y Copy snippet to clipboard
Environment variables:
NAVI_PATH List of :-separated paths to look for cheats
FZF_DEFAULT_OPTS Default fzf options (e.g. '--layout=reverse')
Examples:
navi # default behavior
navi --print # doesn't execute the snippet
navi --path '/some/dir:/other/dir' # uses custom cheats
navi search docker # uses online data
navi query git # filters results by "git"
navi best 'sql create db' root mydb # uses a snippet as a CLI
source "$(navi widget zsh)" # loads the zsh widget
navi --col-widths 10,50,0 # limits the first two columns's width
navi --col-colors 32,32,32 # make all columns green
navi --fzf-overrides '--with-nth 1,2' # shows only the comment and tag columns
navi --fzf-overrides '--nth 1,2' # search will consider only the first two columns
navi --fzf-overrides '--no-exact' # looser search algorithm
More info:
search
http://cheat.sh is used for cheatsheet retrieval
please note that these cheatsheets may not work out of the box
always check the preview window before executing commands!
--col-widths
the number is the percentage relative to the terminal width
0 means that a column will be as wide as necessary
fzf properties
please refer to https://github.com/junegunn/fzf for further details
fzf's --with-nth
1 refers to the comment column; 2, snippet; 3, tag
full docs
please refer to the README at https://github.com/denisidoro/navi