Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
f5526ebc
Commit
f5526ebc
authored
Apr 03, 2016
by
Mikhail Glushenkov
Browse files
Merge pull request #3273 from lspitzner/patch-3
Fix bash-completion after "--"
parents
8b33d3ae
9018c27b
Changes
1
Hide whitespace changes
Inline
Side-by-side
cabal-install/bash-completion/cabal
View file @
f5526ebc
...
...
@@ -55,11 +55,16 @@ _cabal_subcommands()
__cabal_has_doubledash ()
{
for w in "${COMP_WORDS[@]}"
do
if [ "--" == "$w" ]; then
local c=1
# Ignore the last word, because it is replaced anyways.
# This allows expansion for flags on "cabal foo --",
# but does not try to complete after "cabal foo -- ".
local n=$((${#COMP_WORDS[@]} - 1))
while [ $c -lt $n ]; do
if [ "--" = "${COMP_WORDS[c]}" ]; then
return 0
fi
((c++))
done
return 1
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment