fpf-cli 1.6.1 → 1.6.2

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 +1 -1
  2. package/fpf +11 -29
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -36,7 +36,7 @@ By default, `fpf` auto-detects your package manager.
36
36
 
37
37
  On macOS, default auto mode uses both `brew` and `bun` together.
38
38
 
39
- On macOS with no query (`fpf`), startup uses installed package indexes for `brew` and `bun` for faster load; pass a query (`fpf ripgrep`) to search full catalogs.
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
@@ -621,11 +621,11 @@ manager_search_entries() {
621
621
  apt|dnf|pacman|zypper|emerge|choco|scoop|snap|flatpak)
622
622
  effective_query="a"
623
623
  ;;
624
- npm|bun)
624
+ brew|npm|bun)
625
625
  effective_query="aa"
626
626
  ;;
627
- brew|winget)
628
- effective_query=""
627
+ winget)
628
+ effective_query="a"
629
629
  ;;
630
630
  esac
631
631
  fi
@@ -690,13 +690,8 @@ manager_search_entries() {
690
690
  '
691
691
  ;;
692
692
  brew)
693
- if [[ -z "${query}" ]]; then
694
- brew list --versions 2>/dev/null |
695
- awk '{ print $1 "\tinstalled" }'
696
- else
697
- brew search "${effective_query}" 2>/dev/null |
698
- awk 'NF > 0 { print $1 "\t-" }'
699
- fi
693
+ brew search "${effective_query}" 2>/dev/null |
694
+ awk 'NF > 0 { print $1 "\t-" }'
700
695
  ;;
701
696
  winget)
702
697
  winget search "${effective_query}" --source winget --accept-source-agreements --disable-interactivity 2>/dev/null |
@@ -771,25 +766,12 @@ manager_search_entries() {
771
766
  ;;
772
767
  bun)
773
768
  {
774
- if [[ -z "${query}" ]]; then
775
- if bun pm ls --global >/dev/null 2>&1; then
776
- bun pm ls --global 2>/dev/null |
777
- awk 'NR > 1 && NF > 0 { print $1 "\tinstalled" }'
778
- elif bun pm ls >/dev/null 2>&1; then
779
- bun pm ls 2>/dev/null |
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
769
+ if bun search "${effective_query}" >/dev/null 2>&1; then
770
+ bun search "${effective_query}" 2>/dev/null |
771
+ awk 'NR > 1 && NF > 0 { name=$1; $1=""; sub(/^[[:space:]]+/, "", $0); if ($0 == "") $0="-"; print name "\t" $0 }'
772
+ elif command_exists npm; then
773
+ npm search "${effective_query}" --searchlimit=200 --parseable 2>/dev/null |
774
+ awk -F'\t' 'NF >= 2 { print $1 "\t" $2 }'
793
775
  fi
794
776
  } || true
795
777
  ;;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fpf-cli",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Cross-platform fuzzy package finder powered by fzf",
5
5
  "bin": {
6
6
  "fpf": "fpf"