* [patch] ssh -i: don't complete group/world readable files
@ 2015-10-15 23:40 Matthew Martin
0 siblings, 0 replies; only message in thread
From: Matthew Martin @ 2015-10-15 23:40 UTC (permalink / raw)
To: zsh-workers
SSH requires identity files to be readable only by the owner. We can use
this to not complete files that can't be keys. This will normally ignore
*.pub files as by default they're 0644.
- Matthew MArtin
diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh
index a66702a..24706f9 100644
--- a/Completion/Unix/Command/_ssh
+++ b/Completion/Unix/Command/_ssh
@@ -18,7 +18,7 @@ _ssh () {
# for protocol version 2, this can be a comma-separated list
'-c+[select encryption cipher]:encryption cipher:(idea des 3des blowfish arcfour tss none)'
'-F+[specify alternate config file]:config file:_files'
- '*-i+[select identity file]:SSH identity file:_files'
+ '*-i+[select identity file]:SSH identity file:_files -g "*(^AR)"'
'*-o+[specify extra options]:option string:->option'
)
common_transfer=(
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-15 23:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-15 23:40 [patch] ssh -i: don't complete group/world readable files Matthew Martin
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).