Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cristiand391/sf-plugin-fzf-cmp
Fuzzy completion for the Salesforce CLI
https://github.com/cristiand391/sf-plugin-fzf-cmp
completion fzf salesforce-dx salesforce-dx-cli salesforce-dx-plugin sfdx
Last synced: about 1 month ago
JSON representation
Fuzzy completion for the Salesforce CLI
- Host: GitHub
- URL: https://github.com/cristiand391/sf-plugin-fzf-cmp
- Owner: cristiand391
- Created: 2023-10-01T23:39:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-31T20:39:36.000Z (9 months ago)
- Last Synced: 2024-04-24T05:15:47.367Z (9 months ago)
- Topics: completion, fzf, salesforce-dx, salesforce-dx-cli, salesforce-dx-plugin, sfdx
- Language: TypeScript
- Homepage:
- Size: 130 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# @cristiand391/sf-plugin-fzf-cmp
A Salesforce CLI plugin to use fzf's custom fuzzy completion.
[fuzzy-completion-demo.webm](https://github.com/cristiand391/sf-plugin-fzf-cmp/assets/6853656/a937d23b-4e63-41a0-8c2e-5676b8085b91)
> [!NOTE]
> The video was recorded using `,` as the completion trigger (`export FZF_COMPLETION_TRIGGER=','`)See: https://github.com/junegunn/fzf/#custom-fuzzy-completion
## Supported shells:
fzf's custom completion only supports zsh and bash but due to a (bug?) in the bash implementation this plugin only works in zsh (for now, I plan to support bash).## Required dependencies
* `fzf` and fuzzy completion for your shell installed.
* `jq` (used for command completion)See fzf's install instructions:
https://github.com/junegunn/fzf/#installationIf you already have the `fzf` binary installed and want to install the fuzzy completion for your shell you can clone the fzf repo and `source` the completion script in your bashrc/zshrc:
https://github.com/junegunn/fzf/tree/master/shell## Installation
```
sf plugins install @cristiand391/sf-plugin-fzf-cmp
```Then run `sf fzf-cmp` and follow the instructions to source the completion function for `sf` in your shell.
## Usage
The following completion scenarios are supported:
### Commands
`sf`, `sf help`and `sf which` support command completion.### Org usernames:
`--target-org | -o`: org username completion
This will suggest all auth'd orgs (even hubs), except in cases where the required org type can be derived from a command name, e.g.
`sf org delete scratch --target-org` will only suggest scratch org usernames ;).`--target-dev-hub | -v`: devhub username completion
### Configuration variables:
`sf config (set|get|unset)`: config variables completion.
If trying to set, get or unset `target-org` or `target-dev-hub` it will suggest org usernames.### Metadata component names:
`sf project deploy (start|validate) (--metadata | -m)`: metadata component names in "type:name" format in your current project.### Plugin names:
`sf plugins (inspect|uninstall)`: suggest all plugins (except `uninstall`, which will only get user plugins (installed or linked).