-
Notifications
You must be signed in to change notification settings - Fork 291
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
Feature Request: Tab completion for entries #54
Comments
The one tricky thing about this is that we might not be able to look into the blob while logged out, so I guess we'd just fail to complete if the key is not available in the agent (rather than prompt). But generally, I agree it'd be a handy feature. For another take on fuzzy matching see this pull request: #52 -- comments and/or patches welcome on what form that should take. |
I think it would be OK to assume you need to be logged in with the agent running for this to work. I would probably just change my timeout env variable to make tab completion more useful |
This needs some work (please feel free to hack on it!), but here is some basic completion support: The patterns fed to grep aren't escaped properly, so e.g. completing on "(" doesn't work correctly. |
Is this merged yet? Doesn't seem to work on OSX 10.11.1 |
No, it is still unmerged, and still somewhat broken due to improper escaping. |
Merged now. |
excuse my (probably stupid) question, but in what context was the merge supposed to work? I might be entering wrong commands to try the autocomplete, but typing lpass log; and then pressing tap, isn't that supposed to autocomplete to login? |
You need to load it into your bash session, e.g.:
|
I've installed via Homebrew, |
It's in the github repository; as I didn't do the homebrew build, I'm not sure where it might have contrib scripts. If you are using zsh, it probably will not work for you. If using bash, you could just add the |
To anyone else that comes across this from google and is using homebrew:
Mine was in:
|
@timja This worked for me with 1.0.0, but on 1.1.1 there's no |
@samhh Missing for me to. I hadn't noticed because the
|
On Mon, Jan 16, 2017 at 07:34:56AM -0800, Tim Jacomb wrote:
@samhh Missing for me to. I hadn't noticed because the `brew update` kept around the old version
```
$ find $(brew --prefix) -type f -name lpass
/usr/local/Cellar/lastpass-cli/1.0.0/bin/lpass
/usr/local/Cellar/lastpass-cli/1.0.0/share/bash-completion/completions/lpass
/usr/local/Cellar/lastpass-cli/1.1.1/bin/lpass
```
This is because the build system is now cmake based, and I had no idea
where completions should actually go on OSX (on Linux, this would come
from `pkg-config --variable=completionsdir bash-completion`).
I guess we could default to that (share/bash-completions), but if someone
knows better how it should actually be determined, I'd love to know.
|
I believe the location it should actually be going into is:
|
There was some discussion for zsh autocompletion. For the record, bash completions are supported in For me the following seems to work in # support bash autocompletion
# https://stackoverflow.com/questions/3249432/i-have-a-bash-tab-completion-script-is-t
autoload bashcompinit
bashcompinit
if [[ -f /usr/share/bash-completion/completions/lpass ]]; then
source /usr/share/bash-completion/completions/lpass
fi |
Just as an FYI, I got my pull-request to the Homebrew formula for lastpass-cli to now install bash_completion and completion for fish by default when you install it. So if you have already installed lastpass-cli you'll have to manually reinstall because the version of the formula wasn't changed. Homebrew/homebrew-core#24745 (comment) Hope that helps |
Hi @bcopeland Any news on this ? Is there any way to get auto-completion for mac ? |
Hi @tbigueres, If you install it through homebrew you should now have the auto-completion by default. If you previously had lastpass cli installed the version didn't change so it doesn't apply if you do a update you'll have to manually uninstall and reinstall it again for it to get the auto-completion. Have you tried that? |
Hey @rderik Thanks for the quick answer.
But it did not work. I still cannot use autocompletion. |
I just try it now I did: What version of bash are you on? |
I'm on ZSH,
|
I tried again the brew uninstall and reinstall, but still nothing happens. |
Oh yea, When I did the new formula I didn't include the zsh autocomplete, only bash and fishshell :S And for your friend it might be a good idea to update his bash, that is an outdated bash maybe the autocomplete only works on newer versions you can ask him to try a newer version of bash the one in homebrew is: 4.4.12 tell him to try that one and let me know if it works for him. |
Please add tab completion for entries. Similar to pass which has tab completion for folders and entries. When dealing with 100s of entries it is pretty essential to make using the cli useful.
It'd also be great if tab completion worked with fuzzy logic so names didn't have to be exact.
Please see pass' bash completion for more details, but I'm sure you guys can figure out a way. ;)
The text was updated successfully, but these errors were encountered: