Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy up 1Password template functions #2669

Closed
twpayne opened this issue Jan 2, 2023 · 2 comments
Closed

Tidy up 1Password template functions #2669

twpayne opened this issue Jan 2, 2023 · 2 comments
Labels
enhancement New feature or request v3 Planned for v3

Comments

@twpayne
Copy link
Owner

twpayne commented Jan 2, 2023

Is your feature request related to a problem? Please describe.

chezmoi includes a bunch of 1Password-related template functions, several of which relate to 1Password CLI v1, which is long since deprecated. These functions cause unnecessary confusion for users.

Describe the solution you'd like

chezmoi should remove all 1Password CLI v1-related template functions, as hopefully everybody has migrated to 1Password CLI v2.

Describe alternatives you've considered

Maintaining the existing 1Password CLI v1 functions for backwards compatibilty.

Additional context

#1974 cc @halostatue

@twpayne twpayne added enhancement New feature or request v3 Planned for v3 labels Jan 2, 2023
@halostatue
Copy link
Collaborator

I’d like to raise the idea of revisiting the functions and potentially implementing new functions with different names and improved behaviour.

One thing that would be nice—and I’m not sure how it would be done—is having less reliance on the order of parameters after the first (this may apply to other classes of functions that interact with external systems).

Right now, if I want to ensure that I pull something from a particular account (which is sort of required when you have multiple accounts on modern 1Password CLI), I need to do something like {{ onepasswordDocument "my-document" "specific-vault" "specific-account" }}, but my naming convention for my-document is such that all I should need is {{ onepasswordDocument "my-document" "specific-account" }}. I know that Go templates have no real way of doing named parameters, and something like {{ opDocument "my-document" "account=specific-account" }} doesn’t seem to be any better, but it would be nice to figure out a way for the ergonomics to be improved here.

@twpayne
Copy link
Owner Author

twpayne commented Nov 14, 2023

Let's fold this into #2668. Closing.

@twpayne twpayne closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request v3 Planned for v3
Projects
None yet
Development

No branches or pull requests

2 participants