commit 1da83efe18220000e75da66ae8e877012776c869
parent 42d4cd419b59d2e38c159e375b8b14234157eb62
Author: Alexander Burger <abu@software-lab.de>
Date: Mon, 2 Apr 2012 08:58:35 +0200
Slightly simplified
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/bash_completion b/lib/bash_completion
@@ -6,9 +6,8 @@ _pil()
{
local CMD=$(
echo ${COMP_WORDS[0]}
- for I in $(seq $((COMP_CWORD-1)))
+ for ARG in "${COMP_WORDS[@]:1:$((COMP_CWORD-1))}"
do
- local ARG="${COMP_WORDS[$I]}"
test "${ARG:0:1}" = "-" || echo "$ARG"
done )
local IFS=$'\n'