Skip to content

Add bash completion#102

Merged
jpmens merged 1 commit intojpmens:masterfrom
scop:bash-completion
Nov 3, 2019
Merged

Add bash completion#102
jpmens merged 1 commit intojpmens:masterfrom
scop:bash-completion

Conversation

@scop
Copy link
Contributor

@scop scop commented Oct 16, 2019

No description provided.

@jpmens
Copy link
Owner

jpmens commented Nov 2, 2019

Thank you for your contribution. I'm not a big user of bash completion (other than files/directories :), so can you please explain a bit what this actually does? I fail to see what could be completed ...

I'd also appreciate feedback from other people whether they consider this useful.

@scop
Copy link
Contributor Author

scop commented Nov 2, 2019

It completes:

  • available options when entering -<tab>
  • filenames after foo=% and foo=@

...and prevents further completions if -h, -v, or -V has been given

@jpmens jpmens merged commit a94e1bf into jpmens:master Nov 3, 2019
@jpmens
Copy link
Owner

jpmens commented Nov 3, 2019

Merged, thank you.

@jpmens
Copy link
Owner

jpmens commented Nov 3, 2019

@scop any idea why the Linux builds are failing? I can't reproduce on OS/X ...

https://travis-ci.org/jpmens/jo/builds/606789826

I see from the build output that the installer is trying to write to

/usr/bin/install: cannot create regular file '/usr/share/bash-completion/completions/jo.bash': Permission denied

I assume that's due to a missing automake variable?

@scop scop deleted the bash-completion branch November 3, 2019 19:19
@scop
Copy link
Contributor Author

scop commented Nov 3, 2019

It's because distcheck apparently tries to do a staged install just by configuring to a prefix, and the bash-completion completions dir is not subject to that prefix when it's found in the bash completion pkgconfig file. OS X builds are not affected because the fallback /etc/bash_completion.d dir is subject to the prefix.

That kind of usage seems broken to me, DESTDIR is the proper way to do staged installs. Curiously, the autotools generated distcheck appears to try both the prefix and the DESTDIR approach. I'll see if I can find a way to not try the prefix one at all.

@scop
Copy link
Contributor Author

scop commented Nov 3, 2019

Hmph, looks like there is no way to do that. Neither do I want to change the stuff we support in bash-completion to be subject to --prefix, because if for example bash-completion is installed in /some/prefix, completions for it should be installed there no matter what for example a jo builder sets their --prefix to when building jo, otherwise they won't work/be used.

So unfortunately this means all projects using our documented and suggested autotools helpers have a broken distcheck :/ I suggest just not doing it then, i.e. reverting #101.

jpmens added a commit that referenced this pull request Nov 3, 2019
	addresses #102
@jpmens
Copy link
Owner

jpmens commented Nov 3, 2019

@scop thank you very much; done as suggested.

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

Successfully merging this pull request may close these issues.

2 participants