Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#39053 - [bash-completion] make prints errors for grep alias.

Attached to Project: Arch Linux
Opened by Gereon Kremer (nafur) - Wednesday, 26 February 2014, 12:25 GMT
Last edited by Eric Belanger (Snowman) - Thursday, 20 March 2014, 23:41 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Eric Belanger (Snowman)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I usually want to have grep print additional information, hence I have something like "alias grep='grep -n'" in my bashrc.
If this is the case, the bash-completionfor make will print error messages like "bash: 23:set: command not found".
Having a look at /usr/share/bash-completion/completions/make:144 reveals the following problem:

The current status is obtained via "local reset=$( set +o | grep -F posix );" and afterwards restored via "$reset".
However, due to the alias, the reset variable contains "23:set +o posix".

As a fix, I propose to change this line to "local reset=$( set +o | `which grep` -F posix );"...

Additional info:
* extra/bash-completion 2.1-2

Steps to reproduce:
* Add "alias grep='grep -n'" to your bashrc
* Go into a folder with a Makefile
* Try tab completion on make (enter "make " and press tab)
This task depends upon

Closed by  Eric Belanger (Snowman)
Thursday, 20 March 2014, 23:41 GMT
Reason for closing:  Fixed
Additional comments about closing:  bash-completion-2.1-4 has been updated to the current git snapshot
Comment by Gereon Kremer (nafur) - Wednesday, 26 February 2014, 12:33 GMT
Looking into the upstream git revealed that this has been fixed as of commit e3edf7ac423179f70acbd77d9ffbbf5cfa91ce58 on 2014-01-06.
Hence, I guess I have to wait for the next release?

Loading...