Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Regression] make autocompletion skips install #1219

Open
3 tasks
tsdgeos opened this issue Jun 17, 2024 · 3 comments
Open
3 tasks

[Regression] make autocompletion skips install #1219

tsdgeos opened this issue Jun 17, 2024 · 3 comments

Comments

@tsdgeos
Copy link

tsdgeos commented Jun 17, 2024

Describe the bug

To reproduce

  1. rename the Makefile.txt to Makefile (github won't let me upload it with it's correct name) and put it in a folder
  2. cd to 'directory_that_contains_attached_Makefile'
  3. Type 'make inst' and press the TAB key
  4. See that it autocompletes to make install/

Expected behavior

It should autocomplete to make install like it used to (given that there is an install target in the Makefile)

Versions (please complete the following information)

  • Operating system name/distribution and version: ArchLinux
  • bash version, echo "$BASH_VERSION": 5.2.26(1)-release
  • bash-completion version, (IFS=.; echo "${BASH_COMPLETION_VERSINFO[*]}"): 2.14.0

Additional context

This used to work with bash completion 2.11

@akinomyoga
Copy link
Collaborator

  1. rename the Makefile.txt

Minimal reproducer:

install:
.PHONY : install
install/fast:
.PHONY : install/fast
install/local:
.PHONY : install/local

@akinomyoga
Copy link
Collaborator

The current implementation of the make completion assumes install to be a directory name when other targets like install/fast and install/local exist. Then, it considers that the main targets are install/fast and install/local and removes the target install assuming it is a secondary target just to prepare a directory for the main targets.

Maybe we can preserve the phony targets as is, but in the current implementation, the stages of generating targets and filtering the paths are separated. The latter stage doesn't know which ones were generated as phony targets.

@tsdgeos
Copy link
Author

tsdgeos commented Jun 18, 2024

The current implementation of the make completion assumes install to be a directory name when other targets like install/fast and install/local exist.

Please don't do that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants