envoy icon indicating copy to clipboard operation
envoy copied to clipboard

allow adding and printing keys at the same time

Open eklitzke opened this issue 9 years ago • 0 comments

Hi,

This allows me to add something like this to my ~/.bash_profile:

source <(envoy -qap)

and have my keys loaded. For reasons that are not entirely clear to me, previously I had to have something like this in my ~/.bash_profile to get the same effect:

envoy
source <(envoy -p)

In this mode, if you invoke with envoy -qap it will do the following:

  • it will effectively run envoy -a to add all keys
  • the -q option will ensure that the stdout/stderr from the underlying ssh-add command is suppressed
  • the -p flag will act as usual

The way I implemented this, envoy will try to run through as many of the flags as possible on the command line. This isn't strictly correct -- there could be some combinations of flags that don't make sense -- but it's a good start.

Let me know what you think, I'd be happy to change this if you think it needs more work.

Cheers, Evan

eklitzke avatar Jan 16 '16 06:01 eklitzke