Add dumb completion to add-sshkey

This commit is contained in:
2021-03-15 10:23:59 +00:00
parent be3816d83d
commit 99ca63604b

View File

@@ -41,6 +41,11 @@ function add-sshkey() {
fi
}
function _add-sshkey-completions() {
COMPREPLY=( $(ls -1 ${HOME}/.ssh/id_*|cut -d'_' -f 3|cut -d'.' -f 1|sed 's/@//'|sort|uniq) )
}
complete -F _add-sshkey-completions add-sshkey
# Switch to a simple prompt for demos (thanks Mark H for the idea)
function demoprompt() {
if [ ! -z ${OLDPS1+x} ]; then