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

Function wrapping "cd" doesn't get correct completions #4693

Closed
hamon-e opened this issue Jan 30, 2018 · 3 comments
Closed

Function wrapping "cd" doesn't get correct completions #4693

hamon-e opened this issue Jan 30, 2018 · 3 comments
Labels
bug Something that's not working as intended completions
Milestone

Comments

@hamon-e
Copy link
Contributor

hamon-e commented Jan 30, 2018

If i write this function:

function cdtest -w cd
    cd $argv
end

and write cdtest <TAB> it doesn't autocomplete like cd does.
Is there something wrong with my function ?

fish --version
fish, version 2.7.1-708-gea897fcc
@faho faho added the bug Something that's not working as intended label Jan 30, 2018
@faho
Copy link
Member

faho commented Jan 30, 2018

Is there something wrong with my function ?

No. The issue here is that anything called cd itself gets special treatment by the completion machinery - see https://github.com/fish-shell/fish-shell/blob/master/src/complete.cpp#L1468.

This is supposed to go through the "wrap chain", but it seems like it's not doing that correctly.

@ridiculousfish ridiculousfish added this to the fish-future milestone Jan 31, 2018
@jchilders

This comment has been minimized.

@faho faho changed the title Function wraps builtin Function wrapping "cd" doesn't get correct completions Mar 7, 2018
@krobelus
Copy link
Member

Fixd by #7843

@krobelus krobelus modified the milestones: fish-future, fish 3.3.0 Mar 21, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended completions
Projects
None yet
Development

No branches or pull requests

5 participants