From 6fd3a96347e5b2697ef11457a6b0274e77120678 Mon Sep 17 00:00:00 2001 From: speedie Date: Fri, 14 Jul 2023 18:15:21 +0200 Subject: [PATCH] Load -fm module if output is a directory --- scripts/spmenu_path | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/spmenu_path b/scripts/spmenu_path index e5011cb..c3f90f0 100755 --- a/scripts/spmenu_path +++ b/scripts/spmenu_path @@ -100,7 +100,7 @@ parse() { case "$sout" in "?") print_help "$@" - parse + parse "$@" exec_cmd ;; "@") @@ -151,6 +151,14 @@ print_bookmarks() { exec_cmd() { [ -z "$EXEC" ] && EXEC=shell [ "$STDOUT" != "false" ] && printf "%s\n" "$sout" && exit 1 + + if [ -d "$sout" ]; then + load_x "spmenu_fm" + dir="$sout" + prepare_dirnav + return + fi + command -v run_post_func > /dev/null && run_post_func "$sout" # when there's no read_man func because the user is retarded and removed it, this basic function will be called instead