Add pass (password-store) entry completion generator#215
Closed
lucieleblanc wants to merge 1 commit into
Closed
Conversation
Add a Rust generator for the pass command that lists entries and directories from the password store (~/.password-store or $PASSWORD_STORE_DIR). Replace the JavaScript script/postProcess generators in pass.json with generatorName references to the new Rust generators. Two generators are provided: - entries: lists .gpg files (password entries) with the .gpg extension stripped - directories: lists subdirectories for the ls/list subcommand Fixes: warpdotdev/warp#2067 Co-Authored-By: Oz <oz-agent@warp.dev>
APP-3516 Add pass (password-store) entry completion
See GitHub #2067 |
Contributor
Author
|
Closing since no UI verification was done; will retry when skills are being correctly loaded. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a Rust generator for the
pass(password-store) command so thatpass <TAB>lists entries from~/.password-store(or$PASSWORD_STORE_DIR).The existing
pass.jsonspec had JavaScriptscript/postProcessgenerators inherited from the Fig import, which are ignored by Warp. This PR replaces them withgeneratorNamereferences to new Rust-based generators.Changes
New file:
command-signatures/src/generators/pass.rsentriesgenerator: runsfindin the password store directory to list.gpgfiles, strips the extension viased, and returns them as "Password entry" suggestionsdirectoriesgenerator: runsfindto list subdirectories, returning them as "Password directory" suggestions for thels/listsubcommand$PASSWORD_STORE_DIR(falling back to$HOME/.password-store)Modified:
command-signatures/src/generators/mod.rspassmodule and generatorModified:
command-signatures/json/pass.jsongeneratorsobjects withgeneratorNamereferences:pass,show,edit,cp,mv,rm→"generatorName": "entries"ls/list→"generatorName": "directories"Testing
All 21 existing tests pass, including
all_referenced_generators_existandall_command_specs_succeed_deserializationwhich validate that everygeneratorNamein JSON specs maps to a registered Rust generator.Fixes: warpdotdev/warp#2067
Conversation: https://staging.warp.dev/conversation/b5ad1bb5-f9dc-4d6e-a2c2-30e1d2af5abb
Run: https://oz.staging.warp.dev/runs/019d49b6-ab3b-7b18-b13e-c56c3c4c5f13
This PR was generated with Oz.