[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.90-176-g709d6e0

Ville Skyttä ville.skytta at iki.fi
Thu Jun 14 18:55:59 UTC 2012


The following commit has been merged in the master branch:
commit 709d6e06902df7205280d0626995fc5b6abe6e89
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Thu Jun 14 21:54:32 2012 +0300

    *_tilde*: Escape tilde in [[ $1 == \~* ]] tests (RedHat: #817902).

diff --git a/bash_completion b/bash_completion
index 56c4736..d6ae8ae 100644
--- a/bash_completion
+++ b/bash_completion
@@ -920,7 +920,7 @@ _ncpus()
 _tilde()
 {
     local result=0
-    if [[ $1 == ~* && $1 != */* ]]; then
+    if [[ $1 == \~* && $1 != */* ]]; then
         # Try generate ~username completions
         COMPREPLY=( $( compgen -P '~' -u "${1#\~}" ) )
         result=${#COMPREPLY[@]}
@@ -956,7 +956,7 @@ _tilde()
 __expand_tilde_by_ref()
 {
     # Does $1 start with tilde (~)?
-    if [[ ${!1} == ~* ]]; then
+    if [[ ${!1} == \~* ]]; then
         # Does $1 contain slash (/)?
         if [[ ${!1} == */* ]]; then
             # Yes, $1 contains slash;

-- 
bash-completion



More information about the Bash-completion-commits mailing list