lastpass / lastpass-cli

LastPass command line interface tool
GNU General Public License v2.0
2.85k stars 292 forks source link

ls output is incompatible with show input #523

Open jessebett opened 4 years ago

jessebett commented 4 years ago

The output format of lpass ls is incompatible with the input format of lpass show. This is pretty frustrating.

For instance, it does not allow me to pipe the output into my own fuzzy finder. I would like to do something like lpass ls | fzf | lpass show -pc and let fzf fuzzy find the entry I'm interested in.

Right now ls gives output like (category)/name [id: ################] Is there a flag to make lpass show accept this output as input?

waterkip commented 4 years ago

This works for me: lpass show $(lpass ls -l | fzf | sed -e 's/\]//g' | awk '{print $5}') or with regular ls: lpass show $(lpass ls | fzf | sed -e 's/\]//g' | awk '{print $NF}')

I see there are some options for formatting the ls output, but for some reason it is not accepted, only lmu are done. There is code for formatting, just not enabled..