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 descriptions do not show in completions even when created in command line #5206

Closed
pronobis opened this issue Sep 22, 2018 · 1 comment · Fixed by #5212
Closed
Labels
bug Something that's not working as intended
Milestone

Comments

@pronobis
Copy link

pronobis commented Sep 22, 2018

When starting fish with sh -c 'env HOME=$(mktemp -d) fish', adding a function either in config.fish or directly in the command line does not produce any description in the completions. For example for a function:

function foo --description="bar"
    echo "foo"
end

Produces:

> foo [tab]
foo
foo2hbpl2               (Convert Ghostscript pbmraw or bitcmyk format into a ZJS printer stream)

This problem does not seem to be related to #328 since the function is created in config.fish or directly in the command line.

Version:
fish, version 2.7.1
2.7.1

@pronobis pronobis changed the title Function descriptions do not show in completions even when loaded Function descriptions do not show in completions even when created in command line Sep 22, 2018
@faho faho added the bug Something that's not working as intended label Sep 22, 2018
@faho faho added this to the fish-future milestone Sep 22, 2018
@mqudsi mqudsi closed this as completed in 9c63ad3 Sep 26, 2018
@mqudsi
Copy link
Contributor

mqudsi commented Sep 26, 2018

This was a regression caused by some previous refactoring but I wasn't able to bisect it as somewhere in the middle completions would sigabrt fish for me. Fixed in all cases.

@pronobis thanks for reporting and bringing this to our attention. Feel free to try using the fish nightly builds including 9c63ad3 to see if this is fixed for you.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Sep 26, 2018
At some point the completion code was refactored and in the event where
no explicit function description was passed into `resolve_description()`
it would attempt to use the `desc_func` parameter but pass in the
_remaining_ part of the completion rather than the full text, which
would obviously fail.

e.g. if completing `foo<TAB>`, for function `foobar` it would attempt to
find the description for a function named `bar` instead of `foodbar`.

Closes fish-shell#5206.
@mqudsi mqudsi reopened this Sep 26, 2018
mqudsi added a commit to mqudsi/fish-shell that referenced this issue Sep 26, 2018
At some point the completion code was refactored and in the event where
no explicit function description was passed into `resolve_description()`
it would attempt to use the `desc_func` parameter but pass in the
_remaining_ part of the completion rather than the full text, which
would obviously fail.

e.g. if completing `foo<TAB>`, for function `foobar` it would attempt to
find the description for a function named `bar` instead of `foobar`.

Closes fish-shell#5206.
mqudsi added a commit that referenced this issue Sep 27, 2018
At some point the completion code was refactored and in the event where
no explicit function description was passed into `resolve_description()`
it would attempt to use the `desc_func` parameter but pass in the
_remaining_ part of the completion rather than the full text, which
would obviously fail.

e.g. if completing `foo<TAB>`, for function `foobar` it would attempt to
find the description for a function named `bar` instead of `foobar`.

Closes #5206.
@zanchey zanchey modified the milestones: fish-future, fish-3.0 Sep 27, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants