summaryrefslogtreecommitdiffstats
path: root/src/main.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.sh')
-rw-r--r--src/main.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/main.sh b/src/main.sh
index eadc22a..6a23659 100644
--- a/src/main.sh
+++ b/src/main.sh
@@ -2,9 +2,10 @@
source "${SCRIPT_DIR}/src/arg.sh"
source "${SCRIPT_DIR}/src/cheat.sh"
-source "${SCRIPT_DIR}/src/docs.sh"
-source "${SCRIPT_DIR}/src/healthcheck.sh"
+source "${SCRIPT_DIR}/src/health.sh"
source "${SCRIPT_DIR}/src/misc.sh"
+source "${SCRIPT_DIR}/src/opts.sh"
+source "${SCRIPT_DIR}/src/search.sh"
source "${SCRIPT_DIR}/src/selection.sh"
source "${SCRIPT_DIR}/src/str.sh"
source "${SCRIPT_DIR}/src/ui.sh"
@@ -51,7 +52,18 @@ handler::preview() {
main() {
case ${entry_point:-} in
- preview) handler::preview "$@" 2>/dev/null || echo "Unable to find command for '${query:-}'" ;;
- *) health::fzf && handler::main "$@" ;;
+ preview)
+ handler::preview "$@" \
+ || echo "Unable to find command for '${query:-}'"
+ ;;
+ search)
+ health::fzf
+ search::save "$query" || true
+ handler::main "$@"
+ ;;
+ *)
+ health::fzf
+ handler::main "$@"
+ ;;
esac
} \ No newline at end of file