diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-09-09 00:30:58 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-09-09 00:30:58 +1200 |
commit | 299f7b611b2a757098e5ccd3b439d94d1e2c309c (patch) | |
tree | bbab21c2770f4701be1651701d8aa520aff04183 /bash/bash_completion.d | |
parent | Use double-glob to get all refs (diff) | |
download | dotfiles-299f7b611b2a757098e5ccd3b439d94d1e2c309c.tar.gz dotfiles-299f7b611b2a757098e5ccd3b439d94d1e2c309c.zip |
Add IFS clearing before filename/branch reads
Diffstat (limited to 'bash/bash_completion.d')
-rw-r--r-- | bash/bash_completion.d/git.bash | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bash_completion.d/git.bash b/bash/bash_completion.d/git.bash index ba8e5d59..8e10910b 100644 --- a/bash/bash_completion.d/git.bash +++ b/bash/bash_completion.d/git.bash @@ -39,7 +39,7 @@ _git() { # Complete with untracked, unignored files add) local file - while read -rd '' file ; do + while IFS= read -rd '' file ; do [[ -n $file ]] || continue COMPREPLY[${#COMPREPLY[@]}]=$file done < <(git ls-files \ @@ -55,7 +55,7 @@ _git() { # Complete with ref names *) local ref - while read -r ref ; do + while IFS= read -r ref ; do [[ -n $ref ]] || continue COMPREPLY[${#COMPREPLY[@]}]=${ref#refs/*/} done < <(git for-each-ref \ |