Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
keyringer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rhatto
keyringer
Commits
50c8eac5
Commit
50c8eac5
authored
10 years ago
by
rhatto
Browse files
Options
Downloads
Patches
Plain Diff
Shell completions: use KEYRINGER_CHECK_RECIPIENTS=false to avoid fatal errors
parent
b3c2760b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
ChangeLog
+5
-1
5 additions, 1 deletion
ChangeLog
lib/keyringer/completions/bash/keyringer
+3
-3
3 additions, 3 deletions
lib/keyringer/completions/bash/keyringer
lib/keyringer/completions/zsh/_keyringer
+3
-3
3 additions, 3 deletions
lib/keyringer/completions/zsh/_keyringer
with
11 additions
and
7 deletions
ChangeLog
+
5
−
1
View file @
50c8eac5
2014-08-21 - Silvio Rhatto <rhatto@riseup.net>
Shell completions: use KEYRINGER_CHECK_RECIPIENTS=false to avoid
fatal errors
Shell completions: minor zsh fixes
Shell completions: fix handling of keyrings with '-' in their names
and minor zsh fixes.
Edit: Unset RELATIVE_PATH before encrypting file
...
...
This diff is collapsed.
Click to expand it.
lib/keyringer/completions/bash/keyringer
+
3
−
3
View file @
50c8eac5
...
...
@@ -82,7 +82,7 @@ _keyringer() {
if
[
"
${#
COMP_WORDS
[@]
}
"
==
"2"
]
;
then
opts
=
"
$keyrings
"
elif
[
"
${#
COMP_WORDS
[@]
}
"
==
"3"
]
&&
echo
"
${
prev
}
"
|
grep
-qe
"
$instances
"
;
then
opts
=
"
`
export
KEYRINGER_CHECK_VERSION
=
false
&&
keyringer
$instance
commands
`
"
opts
=
"
`
export
KEYRINGER_CHECK_RECIPIENTS
=
false
&&
export
KEYRINGER_CHECK_VERSION
=
false
&&
keyringer
$instance
commands
`
"
elif
[
"
${#
COMP_WORDS
[@]
}
"
==
"3"
]
;
then
opts
=
"init"
elif
[
"
${#
COMP_WORDS
[@]
}
"
==
"4"
]
;
then
...
...
@@ -95,7 +95,7 @@ _keyringer() {
;;
ls
|
tree|mkdir|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open|clip|xclip|find
)
cur
=
"
`
echo
${
cur
}
|
sed
-e
"s|^/*||"
`
"
# avoid leading slash
opts
=
"
$(
bash
-c
"set -f && export KEYRINGER_CHECK_VERSION=false && keyringer
$instance
ls -p -d
${
cur
}
*"
2> /dev/null
)
"
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"
...
...
@@ -118,7 +118,7 @@ _keyringer() {
;;
genpair
)
cur
=
"
`
echo
${
cur
}
|
sed
-e
"s|^/*||"
`
"
# avoid leading slash
opts
=
"
$(
bash
-c
"set -f && export KEYRINGER_CHECK_VERSION=false && keyringer
$instance
ls -p -d
${
cur
}
*"
2> /dev/null
)
"
opts
=
"
$(
bash
-c
"set -f && export
KEYRINGER_CHECK_RECIPIENTS=false && export
KEYRINGER_CHECK_VERSION=false && keyringer
$instance
ls -p -d
${
cur
}
*"
2> /dev/null
)
"
;;
git
)
# TODO
...
...
This diff is collapsed.
Click to expand it.
lib/keyringer/completions/zsh/_keyringer
+
3
−
3
View file @
50c8eac5
...
...
@@ -36,7 +36,7 @@ _keyringer() {
;;
action
)
if
echo
$words
[
2] |
grep
-qe
"
$instances
"
;
then
compadd
"
$@
"
`
KEYRINGER_CHECK_VERSION
=
false
keyringer
$words
[
2] commands
`
compadd
"
$@
"
`
KEYRINGER_CHECK_RECIPIENTS
=
false
KEYRINGER_CHECK_VERSION
=
false
keyringer
$words
[
2] commands
`
else
compadd
"
$@
"
"init"
fi
...
...
@@ -51,7 +51,7 @@ _keyringer() {
;;
ls
|
tree|mkdir|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open|clip|xclip|find
)
words[4]
=
"
`
echo
$words
[
4] |
sed
-e
"s|^/*||"
`
"
# avoid leading slash
compadd
"
$@
"
$(
KEYRINGER_CHECK_VERSION
=
false
keyringer
$words
[
2]
ls
-p
-d
$words
[
4]
'*'
2> /dev/null
)
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
...
...
@@ -74,7 +74,7 @@ _keyringer() {
;;
genpair
)
words[5]
=
"
$(
echo
$words
[
5] |
sed
-e
"s|^/||"
)
"
# TODO: avoid leading slash
compadd
"
$@
"
$(
KEYRINGER_CHECK_VERSION
=
false
keyringer
$words
[
2]
ls
-p
-d
$words
[
5]
'*'
2> /dev/null
)
compadd
"
$@
"
$(
KEYRINGER_CHECK_RECIPIENTS
=
false
KEYRINGER_CHECK_VERSION
=
false
keyringer
$words
[
2]
ls
-p
-d
$words
[
5]
'*'
2> /dev/null
)
;;
git
)
compadd
"
$@
"
$(
_keyringer_git_complete
$words
[
4]
$words
[
5]
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment