mirror of
https://github.com/denisidoro/navi
synced 2024-11-22 11:33:10 +00:00
53 lines
2.2 KiB
Text
53 lines
2.2 KiB
Text
|
An interactive cheatsheet tool for the command-line
|
||
|
|
||
|
Usage:
|
||
|
navi [command] [<args>...] [options]
|
||
|
|
||
|
Commands:
|
||
|
search <cmd> Search for cheatsheets on online repositories
|
||
|
query <cmd> Pre-filter results
|
||
|
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
|
||
|
--fzf-overrides Overrides for fzf commands [default: --with-nth 3,1,2 --exact]
|
||
|
--col-widths Set column widths [default: 15,50,0]
|
||
|
|
||
|
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 # filter 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 --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'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
|