summaryrefslogtreecommitdiffstats
path: root/completions/ssh-keyscan
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
commitf2621414ee5f2f601424c22f00e207903e3b6104 (patch)
tree56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/ssh-keyscan
parentAdding debian version 1:2.11-8. (diff)
downloadbash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.tar.xz
bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.zip
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/ssh-keyscan')
-rw-r--r--completions/ssh-keyscan39
1 files changed, 39 insertions, 0 deletions
diff --git a/completions/ssh-keyscan b/completions/ssh-keyscan
new file mode 100644
index 0000000..f5e4364
--- /dev/null
+++ b/completions/ssh-keyscan
@@ -0,0 +1,39 @@
+# ssh-keyscan(1) completion -*- shell-script -*-
+
+_comp_cmd_ssh_keyscan()
+{
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
+
+ local ipvx
+
+ case $prev in
+ -*4*)
+ ipvx=-4
+ ;;
+ -*6*)
+ ipvx=-6
+ ;;
+ -*f)
+ _comp_compgen_filedir
+ return
+ ;;
+ -*p | -*T)
+ return
+ ;;
+ -*t)
+ _comp_delimited , -W "dsa ecdsa ed25519 rsa"
+ return
+ ;;
+ esac
+
+ if [[ $cur == -* ]]; then
+ _comp_compgen_usage
+ return
+ fi
+
+ _comp_compgen_known_hosts ${ipvx-} -- "$cur"
+} &&
+ complete -F _comp_cmd_ssh_keyscan ssh-keyscan
+
+# ex: filetype=sh