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

Simple improvement to zsh completion when server is not started #430

Merged
merged 2 commits into from
Apr 11, 2018

Conversation

propensive
Copy link
Contributor

This will hide the error if attempting a tab completion to bloop while
the bloop server has not been started, and will offer the single
completion of bloop server instead.

Someone might like to do the same thing for bash....

This will hide the error if attempting a tab completion to bloop while
the bloop server has not been started, and will offer the single
completion of `bloop server` instead.

Someone might like to do the same thing for bash....
@propensive propensive requested a review from Duhemm April 10, 2018 05:35
@jvican
Copy link
Contributor

jvican commented Apr 10, 2018

@propensive Thanks for this! Could you try to do the same for bash or would that take you too much time?

@jvican
Copy link
Contributor

jvican commented Apr 10, 2018

@rberenguel Can you take a peek at this PR and approve? I'm curious why the 2> /dev/null is only needed in _commands and _projects, and not everywhere else too.

@rberenguel
Copy link
Contributor

Looks good @propensive nice approach

@jvican the 2> /dev/null for commands in combination with the notStarted function ensure the first completion is for server... Which then behaves as a command. If you press tab twice without a server you'd get an error without the other 2> /dev/null because it triggers project for command server. Since tags is optional, it does not trigger an error.

@rberenguel
Copy link
Contributor

I leave the merge for @Duhemm so he can also have a look (since he's also requested as reviewer)

@rberenguel
Copy link
Contributor

Btw I just checked and looks like the same approach works also for bash just as fine. @propensive feel like it?

Copy link
Collaborator

@Duhemm Duhemm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

It would indeed be nice to add the same for Bash in this PR if possible.

@propensive Just let us know if you're okay with doing it in this PR or if someone else should take care of it.

@jvican
Copy link
Contributor

jvican commented Apr 11, 2018

Btw I just checked and looks like the same approach works also for bash just as fine. @propensive feel like it?

I think Jon is a little bit absent. Since you already tried @rberenguel, can you push your bash changes to this branch and then we merge 😄? As a contributor, you should be able to checkout jon's repo and push to his branch. See https://github.com/github/hub.

@rberenguel
Copy link
Contributor

Yup, no problem (well, needs to be during lunch break)

@rberenguel
Copy link
Contributor

Could it be that "Allow edits from maintainers" is not enabled in this PR? I can't co the PR branch in Jon's fork, but can co it in a (fresh) clone (not a fork though?) of bloop. Sorry if this is evident, first time I have to do this :D

@jvican
Copy link
Contributor

jvican commented Apr 11, 2018

It could be so @rberenguel, it's Jon the one that can control that. Let's merge this PR, you can follow up with another PR, what do you think? Push the merge button if you agree 😉

@Duhemm
Copy link
Collaborator

Duhemm commented Apr 11, 2018

It looks like Jon pushed his branch directly to this repository.

@rberenguel
Copy link
Contributor

Oh, if I can push directly to the branch in this repository then I can submit the changes

@jvican
Copy link
Contributor

jvican commented Apr 11, 2018

@rberenguel Thanks for completing this pull request Ruben! Merging.

@jvican jvican merged commit b36dc2d into master Apr 11, 2018
@propensive
Copy link
Contributor Author

Sorry, was too busy today! Thanks for sorting it, everyone!

@rberenguel rberenguel deleted the improve-zsh-tab-completion-when-not-started branch April 11, 2018 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants