Skip to content

Commit

Permalink
Merge pull request haskell#3272 from lspitzner/patch-2
Browse files Browse the repository at this point in the history
Respect "--" in bash-completion, fixes haskell#3271
  • Loading branch information
dcoutts committed Apr 2, 2016
2 parents f0c712f + c2ca6e4 commit 8b33d3a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cabal-install/bash-completion/cabal
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,22 @@ _cabal_subcommands()
done
}

__cabal_has_doubledash ()
{
for w in "${COMP_WORDS[@]}"
do
if [ "--" == "$w" ]; then
return 0
fi
done
return 1
}

_cabal()
{
# no completion past cabal arguments.
__cabal_has_doubledash && return

# get the word currently being completed
local cur
cur=${COMP_WORDS[$COMP_CWORD]}
Expand Down

0 comments on commit 8b33d3a

Please sign in to comment.