summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/keyringer/actions/ls2
-rw-r--r--lib/keyringer/completions/bash/keyringer6
-rw-r--r--lib/keyringer/completions/zsh/_keyringer6
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/keyringer/actions/ls b/lib/keyringer/actions/ls
index 61facc8..bb66263 100755
--- a/lib/keyringer/actions/ls
+++ b/lib/keyringer/actions/ls
@@ -10,7 +10,7 @@ source "$LIB" || exit 1
# Aditional parameters
CWD="`pwd`"
-# Avoid trailing slash
+# Avoid leading slash
shift
ARGS="`echo "$*" | sed -e "s|^/*||"`"
diff --git a/lib/keyringer/completions/bash/keyringer b/lib/keyringer/completions/bash/keyringer
index 88c85cf..bbd49f5 100644
--- a/lib/keyringer/completions/bash/keyringer
+++ b/lib/keyringer/completions/bash/keyringer
@@ -95,7 +95,7 @@ _keyringer() {
opts="ls edit"
;;
ls|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|recrypt|open)
- cur="`echo ${cur} | sed -e "s|^/*||"`" # avoid trailing slash
+ 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)"
;;
genpair)
@@ -114,11 +114,11 @@ _keyringer() {
elif [ "${#COMP_WORDS[@]}" == "5" ]; then
case "${command}" in
recipients)
- cur="`echo ${cur} | sed -e "s|^/*||"`" # avoid trailing slash
+ cur="`echo ${cur} | sed -e "s|^/*||"`" # avoid leading slash
opts="$(cd $path/config/recipients && ls --color=never -p ${cur}* 2> /dev/null)"
;;
genpair)
- cur="`echo ${cur} | sed -e "s|^/*||"`" # avoid trailing slash
+ 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)"
;;
git)
diff --git a/lib/keyringer/completions/zsh/_keyringer b/lib/keyringer/completions/zsh/_keyringer
index ac31879..5d0a64c 100644
--- a/lib/keyringer/completions/zsh/_keyringer
+++ b/lib/keyringer/completions/zsh/_keyringer
@@ -51,7 +51,7 @@ _keyringer() {
compadd "$@" ls edit
;;
ls|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|recrypt|open)
- words[4]="`echo $words[4] | sed -e "s|^/*||"`" # avoid trailing slash
+ 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)
;;
genpair)
@@ -70,11 +70,11 @@ _keyringer() {
misc)
case "$words[3]" in
recipients)
- words[5]="$(echo $words[5] | sed -e "s|^/||")" # TODO: avoid trailing slash
+ 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)
- words[5]="$(echo $words[5] | sed -e "s|^/||")" # TODO: avoid trailing slash
+ 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)
;;
git)