fpf-cli 1.6.22 → 1.6.23
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 +8 -2
- 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.23"
|
|
7
7
|
TMP_ROOT="${TMPDIR:-/tmp}/fpf"
|
|
8
8
|
SESSION_TMP_ROOT=""
|
|
9
9
|
HELP_FILE=""
|
|
@@ -2792,12 +2792,14 @@ run_fuzzy_selector() {
|
|
|
2792
2792
|
local reload_ipc_cmd="${5:-}"
|
|
2793
2793
|
local script_path="${BASH_SOURCE[0]}"
|
|
2794
2794
|
local preview_cmd
|
|
2795
|
+
local fzf_shell
|
|
2795
2796
|
|
|
2796
2797
|
if [[ "${script_path}" != /* ]]; then
|
|
2797
2798
|
script_path="$(pwd)/${script_path}"
|
|
2798
2799
|
fi
|
|
2799
2800
|
|
|
2800
2801
|
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)"
|
|
2801
2803
|
|
|
2802
2804
|
local -a fzf_args=()
|
|
2803
2805
|
fzf_args=(-q "${query}" -m \
|
|
@@ -2831,7 +2833,11 @@ run_fuzzy_selector() {
|
|
|
2831
2833
|
fzf_args+=(--bind="ctrl-r:reload:${reload_cmd}")
|
|
2832
2834
|
fi
|
|
2833
2835
|
|
|
2834
|
-
|
|
2836
|
+
if [[ -n "${fzf_shell}" ]]; then
|
|
2837
|
+
SHELL="${fzf_shell}" fzf "${fzf_args[@]}" <"${input_file}"
|
|
2838
|
+
else
|
|
2839
|
+
fzf "${fzf_args[@]}" <"${input_file}"
|
|
2840
|
+
fi
|
|
2835
2841
|
}
|
|
2836
2842
|
|
|
2837
2843
|
main() {
|