mirror of
https://github.com/denisidoro/navi
synced 2024-11-25 04:50:21 +00:00
42 lines
1.2 KiB
Bash
Executable file
42 lines
1.2 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
export SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
source "${SCRIPT_DIR}/src/main.sh"
|
|
|
|
##? 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
|
|
##?
|
|
##? Options:
|
|
##? --print Prevent script execution
|
|
##? --path List of paths to look for cheats
|
|
##? --no-interpolation Prevent argument interpolation
|
|
##? --no-preview Hide command preview window
|
|
##?
|
|
##? Examples:
|
|
##? navi
|
|
##? navi --path '/some/folder:/another/folder'
|
|
##? navi search awk
|
|
##? navi search docker --print
|
|
##? navi query git
|
|
##?
|
|
##? More info:
|
|
##? search
|
|
##? Queries cheatsheets from http://cheat.sh
|
|
##? Please note that these cheatsheets may not work out of the box
|
|
##? Always check the preview window before executing commands!
|
|
##? full docs
|
|
##? Please refer to the README at https://github.com/denisidoro/navi
|
|
|
|
VERSION="0.10.3"
|
|
NAVI_ENV="${NAVI_ENV:-prod}"
|
|
|
|
opts::eval "$@"
|
|
main "$@"
|