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

Breaks bash completion of SCP (and probably others) #29

Closed
psxpaul opened this issue Apr 14, 2017 · 3 comments
Closed

Breaks bash completion of SCP (and probably others) #29

psxpaul opened this issue Apr 14, 2017 · 3 comments

Comments

@psxpaul
Copy link

psxpaul commented Apr 14, 2017

Without gradle-completion sourced in my .bashrc, I can do tab completion with scp:
scp remote_server:.bash_
...
scp remote_server:.bash_history

With gradle-completion sourced, I get:
scp remote_server:.bash_
...
scp .bash_history

I believe it is because COMP_WORDBREAKS is modified at the start of the script, which could effect any bash_completion script that uses the ':' character. I commented out this line in gradle-completion.bash, and scp completion began working again.

@yschimke
Copy link

This breaks completion for my programs. Changing COMP_WORDBREAKS must be avoided.

n.b. you can achieve the same thing using

  _get_comp_words_by_ref -n : cur
...
  __ltrim_colon_completions "$cur"

@leonschreuder
Copy link

@psxpaul @yschimke: Since this doesn't seem to get addressed, you could use my gradle-completion script if you like: https://github.com/meonlol/gradle-tab-completion
Any feedback is appreciated.

@eriwen eriwen self-assigned this Nov 21, 2017
eriwen added a commit that referenced this issue Nov 21, 2017
Change the strategy for getting the current word to
_get_comp_words_by_ref from the bash-completion package.

This requires the bash-completion package to be installed, so
add installation instructions to README.

Issue: #29
@eriwen
Copy link
Contributor

eriwen commented Nov 21, 2017

This is fixed by e74489b and 69fee7f

@eriwen eriwen closed this as completed Nov 21, 2017
eriwen added a commit that referenced this issue Nov 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants