Comment 2 for bug 376546

Revision history for this message
Clint Byrum (clint-fewbar) wrote : Re: [wishlist] Identity filename completion for ssh-add would be nice

Hello Juhamatti, thanks for submitting this feature request back in 2009.

I've marked it as confirmed.

Feedback on the patch:

1) you do not need to do --color=none when piping to a nother command. ls knows when its output is not a TTY to not to use any terminal control.

2) instead of trying to guess the names to filter out, you can make use of the file command...

$ file .ssh/*
.ssh/config: ASCII text
.ssh/id_rsa: PEM RSA private key
.ssh/id_rsa.pub: OpenSSH RSA public key
.ssh/known_hosts: ASCII text, with very long lines
.ssh/known_hosts.old: ASCII text, with very long lines

3) the cmdline switches would be good too

4) ssh-add takes arbitrary file arguments, so make sure to detect when a path is already there, and utilize that instead of substituting ~/.ssh