fpf-cli 1.6.21 → 1.6.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fpf +17 -5
- package/package.json +1 -1
package/fpf
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
set -euo pipefail
|
|
4
4
|
|
|
5
5
|
SCRIPT_NAME="fpf"
|
|
6
|
-
SCRIPT_VERSION="1.6.
|
|
6
|
+
SCRIPT_VERSION="1.6.22"
|
|
7
7
|
TMP_ROOT="${TMPDIR:-/tmp}/fpf"
|
|
8
8
|
SESSION_TMP_ROOT=""
|
|
9
9
|
HELP_FILE=""
|
|
@@ -2526,7 +2526,7 @@ run_ipc_query_notify_action() {
|
|
|
2526
2526
|
fi
|
|
2527
2527
|
|
|
2528
2528
|
if [[ ${#query} -lt ${min_chars} ]]; then
|
|
2529
|
-
send_fzf_prompt_action "Search> " || true
|
|
2529
|
+
run_ipc_reload_action "${query}" || send_fzf_prompt_action "Search> " || true
|
|
2530
2530
|
return 0
|
|
2531
2531
|
fi
|
|
2532
2532
|
|
|
@@ -3046,11 +3046,20 @@ main() {
|
|
|
3046
3046
|
|
|
3047
3047
|
local reload_cmd=""
|
|
3048
3048
|
local reload_ipc_cmd=""
|
|
3049
|
-
|
|
3049
|
+
local reload_fallback_file="${display_file}"
|
|
3050
|
+
if [[ "${ACTION}" == "search" ]]; then
|
|
3050
3051
|
if dynamic_reload_enabled "${#managers[@]}"; then
|
|
3051
|
-
|
|
3052
|
+
if [[ -n "${query}" ]]; then
|
|
3053
|
+
reload_fallback_file="$(mktemp "${SESSION_TMP_ROOT}/reload-fallback.XXXXXX")"
|
|
3054
|
+
collect_search_display_rows "" "${reload_fallback_file}" "${managers[@]-}"
|
|
3055
|
+
if [[ ! -s "${reload_fallback_file}" ]]; then
|
|
3056
|
+
cp "${display_file}" "${reload_fallback_file}"
|
|
3057
|
+
fi
|
|
3058
|
+
fi
|
|
3059
|
+
|
|
3060
|
+
reload_cmd="$(build_dynamic_reload_command "${MANAGER_OVERRIDE}" "${reload_fallback_file}")"
|
|
3052
3061
|
if fzf_supports_listen; then
|
|
3053
|
-
reload_ipc_cmd="$(build_dynamic_query_notify_ipc_command "${MANAGER_OVERRIDE}" "${
|
|
3062
|
+
reload_ipc_cmd="$(build_dynamic_query_notify_ipc_command "${MANAGER_OVERRIDE}" "${reload_fallback_file}")"
|
|
3054
3063
|
fi
|
|
3055
3064
|
fi
|
|
3056
3065
|
fi
|
|
@@ -3059,6 +3068,9 @@ main() {
|
|
|
3059
3068
|
selected="$(run_fuzzy_selector "${query}" "${display_file}" "${header}" "${reload_cmd}" "${reload_ipc_cmd}" || true)"
|
|
3060
3069
|
|
|
3061
3070
|
rm -f "${display_file}"
|
|
3071
|
+
if [[ "${reload_fallback_file}" != "${display_file}" ]]; then
|
|
3072
|
+
rm -f "${reload_fallback_file}"
|
|
3073
|
+
fi
|
|
3062
3074
|
|
|
3063
3075
|
if [[ -z "${selected}" ]]; then
|
|
3064
3076
|
log "Selection canceled"
|