| Summary: | shells/bash-completion: Tab on empty line: words: bad array subscript | ||
|---|---|---|---|
| Product: | Ports & Packages | Reporter: | gnudalf |
| Component: | Individual Port(s) | Assignee: | Adam Weinberger <adamw> |
| Status: | Closed FIXED | ||
| Severity: | Affects Many People | CC: | marino |
| Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(adamw) |
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
gnudalf
2015-01-14 10:20:43 UTC
Auto-assigned to maintainer adamw@FreeBSD.org Hi Adam,
This boils down to a 1 line (2 character) patch:
--- bash_completion.orig
+++ bash_completion
@@ -707,7 +707,7 @@ _init_completion()
fi
done
- [[ $cword -eq 0 ]] && return 1
+ [[ $cword -le 0 ]] && return 1
prev=${words[cword-1]}
[[ ${split-} ]] && _split_longopt && split=true
If you are busy, I could apply this for you. This ticket was originally posted for dports, but I requested that it be elevated to ports so FreeBSD would benefit too.
A commit references this bug: Author: adamw Date: Tue Jan 20 16:22:18 UTC 2015 New revision: 377528 URL: https://svnweb.freebsd.org/changeset/ports/377528 Log: Add a patch to fix tab on an empty line producing: $ bash: words: bad array subscript PR: 196713 Submitted by: gnudalf@yandex.com Obtained from: upstream bug #1289597 Changes: head/shells/bash-completion/Makefile head/shells/bash-completion/files/patch-bash__completion Committed, thanks. And thanks for the reminder, John. |