Commit 2b9a58f4 authored by Silvio Rhatto's avatar Silvio Rhatto
Browse files

Updates shell completions (#69)

parent 1cbca4d9
......@@ -196,9 +196,9 @@ CWD="`pwd`"
# Verify
if [ -z "$NODE" ]; then
echo -e "Usage: keyringer <keyring> $BASENAME <gpg|ssh|x509|x509-self> <file> <hostname> [outfile]"
echo -e "Usage: keyringer <keyring> $BASENAME <gpg|ssh|x509|x509-self|ssl|ssl-self> <file> <hostname> [outfile]"
echo -e "Options:"
echo -e "\t gpg|ssh|x509[-self]: key type."
echo -e "\t gpg|ssh|x509[-self]|ssl|ssl[-self]: key type."
echo -e "\t file : base file name for encrypted output (relative to keys folder),"
echo -e "\t without spaces"
echo -e "\t hostname : host for the key pair"
......
......@@ -97,8 +97,8 @@ _keyringer() {
cur="`echo ${cur} | sed -e "s|^/*||"`" # avoid leading slash
opts="$(bash -c "set -f && export KEYRINGER_CHECK_RECIPIENTS=false && export KEYRINGER_CHECK_VERSION=false && keyringer $instance ls -p -d ${cur}*" 2> /dev/null)"
;;
genpair)
opts="gpg ssh ssl ssl-self"
genkeys|genpair)
opts="gpg ssh x509 x509-self ssl ssl-self"
;;
git)
opts="$(_keyringer_git_complete ${cur})"
......@@ -120,7 +120,7 @@ _keyringer() {
cur="`echo ${cur} | sed -e "s|^/*||"`" # avoid leading slash
opts="$(cd $path/config/recipients && ls --color=never -p ${cur}* 2> /dev/null)"
;;
genpair)
genkeys|genpair)
cur="`echo ${cur} | sed -e "s|^/*||"`" # avoid leading slash
opts="$(bash -c "set -f && export KEYRINGER_CHECK_RECIPIENTS=false && export KEYRINGER_CHECK_VERSION=false && keyringer $instance ls -p -d ${cur}*" 2> /dev/null)"
;;
......
......@@ -53,8 +53,8 @@ _keyringer() {
words[4]="`echo $words[4] | sed -e "s|^/*||"`" # avoid leading slash
compadd "$@" $(KEYRINGER_CHECK_RECIPIENTS=false KEYRINGER_CHECK_VERSION=false keyringer $words[2] ls -p -d $words[4]'*' 2> /dev/null)
;;
genpair)
compadd "$@" gpg ssh ssl ssl-self
genkeys|genpair)
compadd "$@" gpg ssh x509 x509-self ssl ssl-self
;;
git)
compadd "$@" $(_keyringer_git_complete $words[4])
......@@ -76,7 +76,7 @@ _keyringer() {
words[5]="$(echo $words[5] | sed -e "s|^/||")" # TODO: avoid leading slash
compadd "$@" $(cd $keyring_path/config/recipients && ls --color=never -p $words[5]* 2> /dev/null)
;;
genpair)
genkeys|genpair)
words[5]="$(echo $words[5] | sed -e "s|^/||")" # TODO: avoid leading slash
compadd "$@" $(KEYRINGER_CHECK_RECIPIENTS=false KEYRINGER_CHECK_VERSION=false keyringer $words[2] ls -p -d $words[5]'*' 2> /dev/null)
;;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment