Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
rhatto
keyringer
Commits
b2b3a02e
Commit
b2b3a02e
authored
Dec 10, 2013
by
rhatto
Browse files
Adding shell completions for 'mkdir' action (#34)
parent
d3c34db2
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/keyringer/completions/bash/keyringer
View file @
b2b3a02e
...
...
@@ -94,7 +94,7 @@ _keyringer() {
recipients
)
opts
=
"ls edit"
;;
ls
|
tree|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open
)
ls
|
tree|
mkdir|
encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open
)
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
)
"
;;
...
...
lib/keyringer/completions/zsh/_keyringer
View file @
b2b3a02e
...
...
@@ -50,7 +50,7 @@ _keyringer() {
recipients)
compadd "$@" ls edit
;;
ls|tree|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open)
ls|tree|
mkdir|
encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open)
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)
;;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment