fpf-cli 1.6.23 → 1.6.25

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.
Files changed (3) hide show
  1. package/README.md +2 -1
  2. package/fpf +23 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -89,7 +89,8 @@ Installed packages are marked with `*` in the result list.
89
89
  - If `fzf` is missing, `fpf` auto-installs it using a compatible detected manager.
90
90
  - Root managers (`apt`, `dnf`, `pacman`, `zypper`, `emerge`, `snap`) use `sudo` when needed.
91
91
  - `FPF_DYNAMIC_RELOAD`: `always` (default), `single`, or `never`
92
- - If your `fzf` build does not support `--listen`, typing stays on in-memory filtering and `ctrl-r` triggers a manual refresh.
92
+ - Live reload uses `change:reload` by default for reliability (`ctrl-r` uses the same reload command).
93
+ - Set `FPF_DYNAMIC_RELOAD_TRANSPORT=ipc` to opt into `--listen` + IPC query notifications on supported `fzf` builds.
93
94
  - `FPF_RELOAD_MIN_CHARS`: minimum query length before live reload (default `2`)
94
95
  - `FPF_RELOAD_DEBOUNCE`: reload debounce seconds (default `0.12`)
95
96
  - `FPF_DISABLE_INSTALLED_CACHE=1` disables installed-package marker cache
package/fpf CHANGED
@@ -3,7 +3,7 @@
3
3
  set -euo pipefail
4
4
 
5
5
  SCRIPT_NAME="fpf"
6
- SCRIPT_VERSION="1.6.23"
6
+ SCRIPT_VERSION="1.6.25"
7
7
  TMP_ROOT="${TMPDIR:-/tmp}/fpf"
8
8
  SESSION_TMP_ROOT=""
9
9
  HELP_FILE=""
@@ -1463,6 +1463,22 @@ dynamic_reload_enabled() {
1463
1463
  esac
1464
1464
  }
1465
1465
 
1466
+ dynamic_reload_use_ipc() {
1467
+ local transport="${FPF_DYNAMIC_RELOAD_TRANSPORT:-reload}"
1468
+
1469
+ case "${transport}" in
1470
+ ipc|listen|http)
1471
+ fzf_supports_listen
1472
+ ;;
1473
+ auto)
1474
+ fzf_supports_listen
1475
+ ;;
1476
+ *)
1477
+ return 1
1478
+ ;;
1479
+ esac
1480
+ }
1481
+
1466
1482
  rank_display_rows_by_query() {
1467
1483
  local query="$1"
1468
1484
  local input_file="$2"
@@ -2799,7 +2815,11 @@ run_fuzzy_selector() {
2799
2815
  fi
2800
2816
 
2801
2817
  preview_cmd="FPF_SESSION_TMP_ROOT=$(printf '%q' "${SESSION_TMP_ROOT}") ${script_path} --preview-item --manager {1} -- {2}"
2802
- fzf_shell="$(command -v bash 2>/dev/null || true)"
2818
+ if command_exists bash; then
2819
+ fzf_shell="bash"
2820
+ else
2821
+ fzf_shell=""
2822
+ fi
2803
2823
 
2804
2824
  local -a fzf_args=()
2805
2825
  fzf_args=(-q "${query}" -m \
@@ -3064,7 +3084,7 @@ main() {
3064
3084
  fi
3065
3085
 
3066
3086
  reload_cmd="$(build_dynamic_reload_command "${MANAGER_OVERRIDE}" "${reload_fallback_file}")"
3067
- if fzf_supports_listen; then
3087
+ if dynamic_reload_use_ipc; then
3068
3088
  reload_ipc_cmd="$(build_dynamic_query_notify_ipc_command "${MANAGER_OVERRIDE}" "${reload_fallback_file}")"
3069
3089
  fi
3070
3090
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fpf-cli",
3
- "version": "1.6.23",
3
+ "version": "1.6.25",
4
4
  "description": "Cross-platform fuzzy package finder powered by fzf",
5
5
  "bin": {
6
6
  "fpf": "fpf"