Bug 1158054 - bash: words: bad array subscript
Summary: bash: words: bad array subscript
Keywords:
Status: CLOSED DUPLICATE of bug 1135489
Alias: None
Product: Fedora
Classification: Fedora
Component: bash-completion
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-28 12:54 UTC by Harald Hoyer
Modified: 2014-10-31 12:54 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-10-31 12:54:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Harald Hoyer 2014-10-28 12:54:22 UTC
I had to patch bash-completion, otherwise doing "<tab><tab>" on an empty line gave:
bash: words: bad array subscript

bash-completion-2.1-5.fc21.noarch

--- bash_completion	2014-10-28 13:48:35.677151105 +0100
+++ bash_completion	2014-10-28 13:48:25.442061258 +0100
@@ -694,6 +694,8 @@
         return 1
     fi
 
+    [[ $words ]] || return 0
+
     # Remove all redirections so completions don't have to deal with them.
     local i skip
     for (( i=1; i < ${#words[@]}; )); do

Comment 1 Ville Skyttä 2014-10-31 12:54:23 UTC

*** This bug has been marked as a duplicate of bug 1135489 ***


Note You need to log in before you can comment on or make changes to this bug.