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
6ae4c388
Commit
6ae4c388
authored
Aug 21, 2014
by
Silvio Rhatto
Browse files
Shell completions: fix handling of keyrings with '-' in their names
parent
bfd71870
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
ChangeLog
ChangeLog
+3
-1
lib/keyringer/completions/bash/keyringer
lib/keyringer/completions/bash/keyringer
+1
-2
lib/keyringer/completions/zsh/_keyringer
lib/keyringer/completions/zsh/_keyringer
+1
-2
No files found.
ChangeLog
View file @
6ae4c388
2014-08-16 - Silvio Rhatto <rhatto@riseup.net>
2014-08-21 - Silvio Rhatto <rhatto@riseup.net>
Shell completions: fix handling of keyrings with '-' in their names
Edit: Unset RELATIVE_PATH before encrypting file
...
...
lib/keyringer/completions/bash/keyringer
View file @
6ae4c388
...
...
@@ -69,7 +69,6 @@ _keyringer() {
fi
# Process config
source
$config
/config
keyrings
=
"
`
ls
--color
=
never
$config
|
sed
-e
'/^config$/d'
| xargs
`
"
# Available instances
...
...
@@ -77,7 +76,7 @@ _keyringer() {
# The current instance
instance
=
"
${
COMP_WORDS
[1]
}
"
path
=
"
`
eval echo
'$'
$instance
`
"
path
=
"
`
grep
-e
"^
$instance
="
"
$config
/config"
|
tail
-n
1 |
cut
-d
=
-f
2 |
sed
-e
's/"//g'
-e
"s/'//g"
|
sed
-e
's/ *#.*$//'
`
"
# Command completions
if
[
"
${#
COMP_WORDS
[@]
}
"
==
"2"
]
;
then
...
...
lib/keyringer/completions/zsh/_keyringer
View file @
6ae4c388
...
...
@@ -19,9 +19,8 @@ _keyringer() {
fi
# Process config
source $config/config
local keyrings="`ls --color=never $config | sed -e '/^config$/d' | xargs`"
local keyring_path="`
eval echo '$'$words[2]
`"
local keyring_path="`
grep -e "^$words[2]=" "$config/config" | tail -n 1 | cut -d = -f 2 | sed -e 's/"//g' -e "s/'//g" | sed -e 's/ *#.*$//'
`"
local instances="`echo $keyrings | sed -e 's/ /$\\\|^/g' -e 's/^/^/' -e 's/$/$/'`"
_arguments \
...
...
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