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

Fix shell completion bugs #162 #163

Merged
merged 1 commit into from
Nov 6, 2019
Merged

Conversation

johannesloetzsch
Copy link
Contributor

No description provided.

@dundalek
Copy link
Owner

dundalek commented Nov 4, 2019

What OS are you using?

The approach of #!/usr/bin/env -S bash -i will break on Linux (at least on Ubuntu), so it is not a good option.

I think the alternative solution might be to find out where the bash_completion script is located and add an extra path to try.

@johannesloetzsch
Copy link
Contributor Author

What OS are you using?

I use the Linux Distribution NixOS.

The approach of #!/usr/bin/env -S bash -i will break on Linux (at least on Ubuntu), so it is not a good option.

The split-string option was added to coreutils in April 2018. Ubuntu should support it since 18.10

I think the alternative solution might be to find out where the bash_completion script is located and add an extra path to try.

NixOS allows having multiple versions being installed at the same time at different path at dynamic paths below /nix/store/. So an additional hardcoded path will not help.

I see 3 different ways to solve it:

  1. The shebang from this pull request requiring a not too long outdated version of coreutils.
  2. Loading _completion_loader by . $(which bash) -i into a non-interactive bash.
  3. A more dirty workaround would be, that I patch the shebang, while the nix-package is created.

How do you thing? Should we give 2. a try?

@johannesloetzsch
Copy link
Contributor Author

This would evaluate the path where the bash_completion script is located at nixos

@dundalek
Copy link
Owner

dundalek commented Nov 6, 2019

cool, thank you 👍

@dundalek dundalek merged commit 0cba5e9 into dundalek:master Nov 6, 2019
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