feat: e opens a repo's SOPS or .env file, in nvim, sops edit or your editor
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
6fab41703e
commit
c29319b821
11 files changed
+395
-12
No files matched your search
@@ -52,6 +52,7 @@ match case exactly.
|
||||
| `Y` | copy the reference (`@Microsoft.KeyVault(...)`, key/certificate URL, `{{secrets/scope/key}}`) |
|
||||
| `v` | versions of the selected item (Azure); `space`/`y`/`Y` then act on that version; `esc`, `⌫` or `v` to go back |
|
||||
| `o` | open the selected item in the browser (over SSH: copy the link) |
|
||||
| `e` | open the selected SOPS or `.env` file, or a secret's file at its line ([how](repos.md#opening-files)) |
|
||||
| `s` / `S` | copy a [link](links.md) to the selected item / share menu |
|
||||
| `ctrl+o` | open a link or reference (or just paste one) |
|
||||
| `x` | [custom commands](custom-commands.md) |
|
||||
|
||||
@@ -63,6 +63,22 @@ copying or `lazysecrets get` decrypts one value with your `sops` binary, so
|
||||
whatever sops uses works (age keys, Azure Key Vault through az, AWS/GCP
|
||||
KMS, PGP). When sops can't decrypt, its whole error message is shown.
|
||||
|
||||
## Opening files
|
||||
|
||||
`e` opens the selected file, or on a secret, its file at that key's line:
|
||||
|
||||
- **SOPS files** open with `sops edit`, which decrypts them into your
|
||||
editor (`$SOPS_EDITOR` or `$EDITOR`) and encrypts them again when you
|
||||
save. lazysecrets comes back after, with the file's keys reloaded.
|
||||
- **Other files**, when lazysecrets runs inside nvim (its plugin, or
|
||||
`:terminal`): lazysecrets quits and the file opens in that nvim, in the
|
||||
window you came from.
|
||||
- Otherwise in `$VISUAL` or `$EDITOR` in the terminal, coming back after;
|
||||
without either, in the system's default app for the file.
|
||||
|
||||
Editors that take a line (vim, nvim, nano, emacs, micro, helix, VS Code,
|
||||
Zed, Sublime and others) start on the key.
|
||||
|
||||
## Links
|
||||
|
||||
Links name the repo by its git remote, so they open in a colleague's clone
|
||||
|
||||
Reference in new issue
Block a user