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
   Ctrl-j                   Move down one entry
   Ctrl-k                   Move up one entry

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
