[Bash-completion-devel] [bash-completion-Bugs][314345] `make` completion broken on BSD systems since commit b28d7108
bash-completion-bugs at alioth.debian.org
bash-completion-bugs at alioth.debian.org
Sat Aug 24 00:31:32 UTC 2013
bash-completion-Bugs item #314345 was changed at 2013-08-24 04:31 by Igor Murzov
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=314345&group_id=100114
>Status: Closed
Priority: 3
Submitted By: David Rothlisberger (drothlis-guest)
Assigned to: Nobody (None)
Summary: `make` completion broken on BSD systems since commit b28d7108
Distribution: None
Originally reported in: None
Milestone: 2.0
>Status: Fix Committed
Original bug number:
Initial Comment:
Commit b28d7108 [1] (added Aug 2012) uses the GNU-specific "sed -r" in
"completions/make". This is not allowed since Jan 2010 -- see the third
comment on [#311393]. "completions/make" fails "test/runLint", for
this reason.
The user-visible effect is that when I type "make <TAB>" I get this
output:
$ make <TAB>sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
[1] http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=commitdiff;h=b28d7108
----------------------------------------------------------------------
>Comment By: Igor Murzov (garik-guest)
Date: 2013-08-24 04:31
Message:
In: http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=commit;h=3ac523f57e8d26e0943dfb2fd22f4a8879741c60
Thanks.
----------------------------------------------------------------------
Comment By: Rainer Müller (raimue-guest)
Date: 2013-08-22 13:48
Message:
Thanks for the review. This last change actually just slipped in during testing and was unintended.
Here is a second version of the patch in which I corrected this mistake:
http://raim.codingfarm.de/patches/0001-v2-make-Fix-basic-regex-for-portability-Alioth-314345.patch
----------------------------------------------------------------------
Comment By: Igor Murzov (garik-guest)
Date: 2013-08-21 02:15
Message:
> The important parts are that a semicolon is needed after each command
Ok.
> Also, \t is not recognized as a representation for a tab
Ok.
Is there any particular reason for the following change:
- /^[^#\t:%]\{1,\}:/ { # found target block
+ /^[^# :%]\{0,\}:/ { # found target block
? Does it fix some bug for you? Could you provide a testcase?
And if this change is needed could you replace `\{0,\}' with '*', just for clarity? Thanks for the patch.
----------------------------------------------------------------------
Comment By: Rainer Müller (raimue-guest)
Date: 2013-08-19 19:12
Message:
Unfortunately, this fix was not enough for me on Mac OS X with BSD sed. I had to tweak it further to get it to work.
It seems like I am not allowed to attach a file to this bug report, so I uploaded my patch here:
http://raim.codingfarm.de/patches/0001-make-Fix-basic-regex-for-portability-Alioth-314345.patch
The important parts are that a semicolon is needed after each command or sed tries to parse the comment in the same line as additional flags. Also, \t is not recognized as a representation for a tab character but taken as a literal 't'. Without this patch any target containing a 't' is just filtered out.
This patch is already being applied in the bash-completion distribution by MacPorts.
----------------------------------------------------------------------
Comment By: Igor Murzov (garik-guest)
Date: 2013-08-14 02:43
Message:
Fixed in commit: http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=commit;h=f230cfddbd12b8c777040e33bac1174c0e2898af
----------------------------------------------------------------------
Comment By: Igor Murzov (garik-guest)
Date: 2013-08-06 02:37
Message:
Accepted.
----------------------------------------------------------------------
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=314345&group_id=100114
More information about the Bash-completion-devel
mailing list