tadfisher / pass-otp

A pass extension for managing one-time-password (OTP) tokens
GNU General Public License v3.0
1.26k stars 86 forks source link

[WIP] Add fish completions (Fixing #118) #151

Open harmtemolder opened 2 years ago

harmtemolder commented 2 years ago

I dove into the way fish completions work and came up with a solution to add them for pass otp. They work, but still a couple of TODOs before it's ready for production:

apastuszak commented 2 years ago

If you installed pass on a Mac using homebrew the path to the completion file is:

/opt/homebrew/share/fish/vendor_completions.d/pass.fish

Shouldn't the path be set by the package maintainer for whatever distro this is packaged for?

This is working great on my Mac.

harmtemolder commented 2 years ago

This is working great on my Mac.

Do you mean these added completions?

Shouldn't the path be set by the package maintainer for whatever distro this is packaged for?

I guess it should, but I'm not in the trade of making packages and don't know how to do this. That means I'd need help to finish this PR.

@tadfisher Can you—or do you know anyone who can—help me figure out a way to dynamically get the location of the original pass's completions so that I don't have to hard-code them?

vonpupp commented 10 months ago

I made my own completion following @tadfisher's comments. These are on a separate file named 'pass-otp.fish' and instead of copying it to /usr/share/fish/vendor_completions.d/pass.fish, I copy to my private XDG config file (.config/fish/completions/), so it doesn't conflict with pass.fish. I know nothing about fish completions, I basically copied and pasted and followed along the pass git command as suggested, but it seems to be working fine.

Personally I manage that file within my dotfiles, but if you want I can open a PR to contribute this file. I am not sure how to add that to the Makefile but it shouldn't be that hard.

BarbzYHOOL commented 10 months ago

I made my own completion following @tadfisher's comments. These are on a separate file named 'pass-otp.fish' and instead of copying it to /usr/share/fish/vendor_completions.d/pass.fish, I copy to my private XDG config file (.config/fish/completions/), so it doesn't conflict with pass.fish. I know nothing about fish completions, I basically copied and pasted and followed along the pass git command as suggested, but it seems to be working fine.

Personally I manage that file within my dotfiles, but if you want I can open a PR to contribute this file. I am not sure how to add that to the Makefile but it shouldn't be that hard.

i tried this but it doesn't help one bit with this issue at least https://github.com/tadfisher/pass-otp/issues/187

pickfire commented 3 weeks ago

I guess this should be closed since it's superseeded by another PR?