Skip to content
This repository has been archived by the owner on Jan 27, 2020. It is now read-only.

Bash completion should add a space after <Tab> key. #5052

Closed
ghost opened this issue Apr 5, 2011 · 10 comments
Closed

Bash completion should add a space after <Tab> key. #5052

ghost opened this issue Apr 5, 2011 · 10 comments

Comments

@ghost
Copy link

ghost commented Apr 5, 2011

If compared to the Git's completion. You see it adds a space after it have completed the suggestions. Where the Homebrew require the users to press space after a press.

Tried to look up a solution, but since my experience with bash-completion is quite low, I were unavailable to come up with a proper solution.

What are your ideas on the matter?

@adamv
Copy link
Contributor

adamv commented Apr 5, 2011

I'm not a Bash / completion expert either; but I think there are some switches that can be used to set this option so I'll look into it, thanks for the report.

@adamv
Copy link
Contributor

adamv commented Apr 5, 2011

Can you give a specific example where a space ins't added?

For instance:
brew install mysql
doesn't add a space, as there are multiple formulae with that prefix, so tab-tab will list them.

@ghost
Copy link
Author

ghost commented Apr 5, 2011

After the first argument.

$ brew in< Tab> => $ brew install

$ git ad< Tab> => $ git add_
(Where the underscore is a space.

@adamv
Copy link
Contributor

adamv commented Apr 5, 2011

There is more than one "in" command: install and info. Which is kind of unfortunate. But this behavior is "as expected"; if you "brew ins" then a space is added.

@adamv adamv closed this as completed Apr 5, 2011
@ghost
Copy link
Author

ghost commented Apr 5, 2011

Bad example on my part. This is the case with the other arguments as well.

I just tried $ brew ins< Tab> but still no space. Same with dirty and info.

I've installed the bash-completion from source. But the reason I did so, where because Homebrew acted this way. I have recently reset med Homebrew tree. Which should make sure I have the latest version of the brew completion file.

@ghost
Copy link
Author

ghost commented May 14, 2011

Looking really hard into this now. But there isn't really any good information on the topic. I've been looking a lot on existing examples. But to no help. There seems to be tons of ways to do it. Since it's basically based on BASH, it seems that I need to learn more about the basic of BASH to grasp the concept completely.

I'll keep you posted :)

@jacknagel
Copy link
Contributor

Forgive me for asking a dumb question but is the issue still that brew ins<Tab> doesn't add a trailing space? I can't reproduce that.

@ghost
Copy link
Author

ghost commented May 15, 2011

I can't seem to get the space at the end, so that I can start directly to type the wanted formula name.

@ghost
Copy link
Author

ghost commented May 15, 2011

I get the space, maybe a terminal emulator problem?

@ghost
Copy link
Author

ghost commented May 15, 2011

I'm using xterm-new with iTerm2. Will test de others in a bit. I also had the same problem with xterm-256color.

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants