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

expand:choose-next tab completion behaviour changed from fish 3.0 default #2

Open
ipwnponies opened this issue Jan 3, 2019 · 1 comment
Assignees

Comments

@ipwnponies
Copy link

This plugin overrides the default binding for \t from complete to expand:execute. If no expand rules match, the completion behaviour is supposed to fall back to default complete (show completion list and pager navigation for subsequent Tab).

With fish 3.0, there were some changes to handling of tab completion. This causing the expand:choose-next function to not work the same as previously. It no-ops instead of scrolling through the choices (emulating default complete behaviour).

@ipwnponies ipwnponies changed the title Non-expand tab completion behaviour changed from default, with fish 3.0 expand:choose-next tab completion behaviour changed from fish 3.0 default Jan 3, 2019
@sagebind sagebind self-assigned this Jan 4, 2019
@ipwnponies
Copy link
Author

This seems to be caused by commandline -f complete

# If no replacements are available for the current token, defer to regular completion.
if not set -q __expand_replacements[1]
commandline -f complete
return
end

I tested the behaviour of complete vs. commandline -f complete, on fish 3.0.0 and fish 2.7.1:

bind \t complete
bind \cx 'commandline -f complete'

complete will show and invoke completion pager, allowing for scrolling through entries with each subsequent key press.
commandline -f complete only shows the completions, it doesn't enter the pager. Aftering entering the pager manually (using tab or arrow keys), then it will allow scrolling.

haifengkao added a commit to haifengkao/plugin-expand that referenced this issue Jun 24, 2019
simple workaround
check if completion menu exists
if so, just select the next item
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants