iridakos/goto

bash-completions breaking macOS

runeimp opened this issue · 4 comments

Is bash-completions required to use goto? I couldn't seem to get it working until I added bash-completions and set that up via Homebrew. But that broke the default BASH completions in iTerm2. Sorry, I didn't test with the default Terminal before removing bash-completions and goto. I really like using goto but I can't accept how bash-completions changes the default behavior under iTerm2. Is it possible to use just goto without bash-completions?

Hi @runeimp.

The script has to be sourced in order to make the goto function available because it's not an executable. In the same script though there is the code for the bash completion which is an important feature of the program.

Unfortunately, I don't see a solution at the moment unless you manually source it without the bash completion (ex. copying the script to a file and remove the bash completion code and then add a line in your .bashrc to source it). I don't suggest it though.

I didn't have any problems when using the formula in macOS under iterm2 though. Can you provide more information on what breaks after installing the bash-completions?

Thank you for reporting.

Hey @iridakos,

I did eventually try to just source the file without bash-completion installed and it was working fine. The issues I was having with bash-completion was with path completion for cd or ls and file path completion for text editors such as vim and subl (Sublime Text 3). Basically all other completions that I was used to using were broken.

Hm, sourcing the file also seems to be allowing the completion of goto shortcuts. I just double checked brew info bash-completion and brew info bash-completion@2 and neither are installed.

@runeimp ok, then it could be something iTerm does with the auto-completion. Good news that it works though. Thanks for reporting ;)

Just a note that the auto-completion works in Terminal as well even thought I've do not have bash-completion installed.