Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
libre
keyringer-macosx
Commits
2b9a58f4
Commit
2b9a58f4
authored
Mar 17, 2015
by
Silvio Rhatto
Browse files
Updates shell completions (#69)
parent
1cbca4d9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
lib/keyringer/actions/genkeys
lib/keyringer/actions/genkeys
+2
-2
lib/keyringer/completions/bash/keyringer
lib/keyringer/completions/bash/keyringer
+3
-3
lib/keyringer/completions/zsh/_keyringer
lib/keyringer/completions/zsh/_keyringer
+3
-3
No files found.
lib/keyringer/actions/genkeys
View file @
2b9a58f4
...
...
@@ -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"
...
...
lib/keyringer/completions/bash/keyringer
View file @
2b9a58f4
...
...
@@ -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
)
"
;;
...
...
lib/keyringer/completions/zsh/_keyringer
View file @
2b9a58f4
...
...
@@ -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)
;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment