[Bash-completion-commits] [bash-completion] 01/02: sbopkg, slapt-{get, src}: expand tilde in config file name

Igor Murzov garik-guest at moszumanska.debian.org
Thu Jun 5 21:44:11 UTC 2014


This is an automated email from the git hooks/post-receive script.

garik-guest pushed a commit to branch master
in repository bash-completion.

commit 505481c8cc4bdb13b89de8505d5d84c31314245c
Author: Igor Murzov <e-mail at date.by>
Date:   Fri Jun 6 01:18:32 2014 +0400

    sbopkg, slapt-{get,src}: expand tilde in config file name
    
    This fixes following [[ -r "$config" ]] when file name begins with ~.
---
 completions/sbopkg    | 1 +
 completions/slapt-get | 1 +
 completions/slapt-src | 1 +
 3 files changed, 3 insertions(+)

diff --git a/completions/sbopkg b/completions/sbopkg
index f658910..b05da81 100644
--- a/completions/sbopkg
+++ b/completions/sbopkg
@@ -40,6 +40,7 @@ _sbopkg()
     for (( i=${#words[@]}-1; i>0; i-- )); do
         if [[ "${words[i]}" == -f ]]; then
             config="${words[i+1]}"
+            __expand_tilde_by_ref config
             break
         fi
     done
diff --git a/completions/slapt-get b/completions/slapt-get
index b94c1f0..2ec7f79 100644
--- a/completions/slapt-get
+++ b/completions/slapt-get
@@ -45,6 +45,7 @@ _slapt_get()
     for (( i=${#words[@]}-1; i>0; i-- )); do
         if [[ ${words[i]} == -@(c|-config) ]]; then
             config="${words[i+1]}"
+            __expand_tilde_by_ref config
             break
         fi
     done
diff --git a/completions/slapt-src b/completions/slapt-src
index a3a646a..3cac4fe 100644
--- a/completions/slapt-src
+++ b/completions/slapt-src
@@ -41,6 +41,7 @@ _slapt_src()
     for (( i=${#words[@]}-1; i>0; i-- )); do
         if [[ ${words[i]} == -@(c|-config) ]]; then
             config="${words[i+1]}"
+            __expand_tilde_by_ref config
             break
         fi
     done

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bash-completion/bash-completion.git



More information about the Bash-completion-commits mailing list