fpf-cli 1.6.1 → 1.6.3
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/README.md +2 -2
- package/fpf +12 -29
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,9 +34,9 @@ fpf -U
|
|
|
34
34
|
|
|
35
35
|
By default, `fpf` auto-detects your package manager.
|
|
36
36
|
|
|
37
|
-
On macOS, default auto mode uses
|
|
37
|
+
On macOS, default auto mode uses `brew`, `npm`, and `bun` together.
|
|
38
38
|
|
|
39
|
-
On macOS with no query (`fpf`), startup uses
|
|
39
|
+
On macOS with no query (`fpf`), startup uses a lighter default search for `brew` and `bun` so you still get installable packages without the huge initial catalog load.
|
|
40
40
|
|
|
41
41
|
On Linux, default auto mode uses your distro manager plus installed cross-platform managers (`snap`, `flatpak`, `brew`, `npm`, `bun`).
|
|
42
42
|
|
package/fpf
CHANGED
|
@@ -368,6 +368,7 @@ detect_default_managers() {
|
|
|
368
368
|
|
|
369
369
|
if [[ "${os}" == "Darwin" ]]; then
|
|
370
370
|
add_detected_manager "brew"
|
|
371
|
+
add_detected_manager "npm"
|
|
371
372
|
add_detected_manager "bun"
|
|
372
373
|
if [[ -n "${emitted}" ]]; then
|
|
373
374
|
return
|
|
@@ -621,11 +622,11 @@ manager_search_entries() {
|
|
|
621
622
|
apt|dnf|pacman|zypper|emerge|choco|scoop|snap|flatpak)
|
|
622
623
|
effective_query="a"
|
|
623
624
|
;;
|
|
624
|
-
npm|bun)
|
|
625
|
+
brew|npm|bun)
|
|
625
626
|
effective_query="aa"
|
|
626
627
|
;;
|
|
627
|
-
|
|
628
|
-
effective_query=""
|
|
628
|
+
winget)
|
|
629
|
+
effective_query="a"
|
|
629
630
|
;;
|
|
630
631
|
esac
|
|
631
632
|
fi
|
|
@@ -690,13 +691,8 @@ manager_search_entries() {
|
|
|
690
691
|
'
|
|
691
692
|
;;
|
|
692
693
|
brew)
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
awk '{ print $1 "\tinstalled" }'
|
|
696
|
-
else
|
|
697
|
-
brew search "${effective_query}" 2>/dev/null |
|
|
698
|
-
awk 'NF > 0 { print $1 "\t-" }'
|
|
699
|
-
fi
|
|
694
|
+
brew search "${effective_query}" 2>/dev/null |
|
|
695
|
+
awk 'NF > 0 { print $1 "\t-" }'
|
|
700
696
|
;;
|
|
701
697
|
winget)
|
|
702
698
|
winget search "${effective_query}" --source winget --accept-source-agreements --disable-interactivity 2>/dev/null |
|
|
@@ -771,25 +767,12 @@ manager_search_entries() {
|
|
|
771
767
|
;;
|
|
772
768
|
bun)
|
|
773
769
|
{
|
|
774
|
-
if
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
awk 'NR > 1 && NF > 0 { print $1 "\tinstalled" }'
|
|
781
|
-
elif command_exists npm; then
|
|
782
|
-
npm ls -g --depth=0 --parseable 2>/dev/null |
|
|
783
|
-
awk -F'/' 'NR > 1 { print $NF "\tglobal" }'
|
|
784
|
-
fi
|
|
785
|
-
else
|
|
786
|
-
if bun search "${effective_query}" >/dev/null 2>&1; then
|
|
787
|
-
bun search "${effective_query}" 2>/dev/null |
|
|
788
|
-
awk 'NR > 1 && NF > 0 { name=$1; $1=""; sub(/^[[:space:]]+/, "", $0); if ($0 == "") $0="-"; print name "\t" $0 }'
|
|
789
|
-
elif command_exists npm; then
|
|
790
|
-
npm search "${effective_query}" --searchlimit=200 --parseable 2>/dev/null |
|
|
791
|
-
awk -F'\t' 'NF >= 2 { print $1 "\t" $2 }'
|
|
792
|
-
fi
|
|
770
|
+
if bun search "${effective_query}" >/dev/null 2>&1; then
|
|
771
|
+
bun search "${effective_query}" 2>/dev/null |
|
|
772
|
+
awk 'NR > 1 && NF > 0 { name=$1; $1=""; sub(/^[[:space:]]+/, "", $0); if ($0 == "") $0="-"; print name "\t" $0 }'
|
|
773
|
+
elif command_exists npm; then
|
|
774
|
+
npm search "${effective_query}" --searchlimit=200 --parseable 2>/dev/null |
|
|
775
|
+
awk -F'\t' 'NF >= 2 { print $1 "\t" $2 }'
|
|
793
776
|
fi
|
|
794
777
|
} || true
|
|
795
778
|
;;
|