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

Want to switch to default Tab behaviour while using cd. #10

Closed
TanishBansal opened this issue May 5, 2020 · 11 comments
Closed

Want to switch to default Tab behaviour while using cd. #10

TanishBansal opened this issue May 5, 2020 · 11 comments
Labels
enhancement New feature or request

Comments

@TanishBansal
Copy link

How do I switch to default Tab behaviour while using cd i.e. togge between the options rather than insert all the options

@marlonrichert
Copy link
Owner

Can you please describe, step by step, what you are doing and what you expect? I don't understand what you mean.

@wookayin
Copy link

wookayin commented May 6, 2020

Just like the default behavior.

$ f|
fa/ fb/ fc/
  • Pressing tab for the first time: select fa/
  • Second time: fb/
  • Third time: fc/

@marlonrichert
Copy link
Owner

Thanks, I understand it now. I don’t have an answer to that yet. I’ll look into it.

@marlonrichert
Copy link
Owner

@TanishBansal @wookayin

First, please git pull, so you're updated to the latest version.

Then, to get back the old skool complete behavior, add the following to your .zshrc file, right after you source zsh-autocomplete:

zle -N complete-word
complete-word() {
  zle .complete-word
}

@wookayin
Copy link

wookayin commented May 6, 2020

@marlonrichert You should introduce an environment variable to configure behaviors.

Also, the tab completion still doesn't work as I described. Did you ever test it? Even after the "roll back" overriding of complete-word, it is inserting completions just twice.

@marlonrichert
Copy link
Owner

marlonrichert commented May 7, 2020

@wookayin Sorry to hear it’s not working for you. 😕 Yes, I tested it and it worked for me exactly as you described.

What do you mean with “ it is inserting completions just twice“? Can you give me an exact test case for this where this happens?

Do you have a concrete proposal for what kind of environment variables you think should be introduced and how they shoul work? If you can write a pull request for it, even better. 🙂

@marlonrichert
Copy link
Owner

it is inserting completions just twice.

After using my suggested solution above, I can tab around infinitely, not just twice. I'm going to close this issue now. If you can provide me with a test case that let's me reproduce it, then I will reopen the issue.

@marlonrichert
Copy link
Owner

@TanishBansal @wookayin
I just wanted to let you know that 7256aeb adds a new way to configure tab completion. Please see the Readme.

@NICHOLAS85
Copy link

NICHOLAS85 commented May 27, 2020

hey @marlonrichert, I see you added support for zsh-autosuggestions and it looks like everything is working correctly. However, I can't change the tab behavior as it suggests in the readme. I'd like to start menu selection using tab but it seems it always accepts the autosuggestion. Is there a way to work around this?

@marlonrichert
Copy link
Owner

marlonrichert commented May 28, 2020

Sorry, I somehow managed to commit the new code commented out. 🤦🏽‍♂️

I now pushed it in again, but not commented out this time. Please update and try again.

@TanishBansal
Copy link
Author

Thanks @marlonrichert, I have made quite a lot of changes from19bc2c which fulfills my current need plenty.

Thanks for your awesome work.!

@marlonrichert marlonrichert added the enhancement New feature or request label Mar 8, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants