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

functions foo doesn't show --wraps flag #1625

Closed
lilyball opened this issue Aug 21, 2014 · 6 comments
Closed

functions foo doesn't show --wraps flag #1625

lilyball opened this issue Aug 21, 2014 · 6 comments
Assignees
Labels
bug
Milestone

Comments

@lilyball
Copy link
Contributor

@lilyball lilyball commented Aug 21, 2014

When a function is defined with --wraps, the output of functions (and therefore, the output of type) does not include the --wrapsflag:

> function foo --wraps git; git; end
> functions foo
function foo
    git;
end
@ridiculousfish
Copy link
Member

@ridiculousfish ridiculousfish commented Aug 22, 2014

Currently you can specify --wraps in complete and function, but we don't track where it came from. This is a little bad because redefining a function doesn't clear any '--wraps' from the previous function definition. We ought to track where the --wraps comes from, so we can both display it and clear it.

@ridiculousfish ridiculousfish added this to the next-major milestone Aug 22, 2014
@wilriker
Copy link

@wilriker wilriker commented May 24, 2016

Additionally to not showing the --wraps part it is also dropped when using funcsave to persist the function. So is this value persisted anywhere else?

I am using the same config on multiple machines and I only share (most parts of) ~/.config/fish directory and not the directory where the completions are stored. I am fairly new to fish and as I am still setting this up on all machines I have not yet checked whether the completion carries on to the other machines without redefining the function adding the --wraps part back in.

@ridiculousfish ridiculousfish self-assigned this May 24, 2016
@floam floam added this to the next-2.x milestone Oct 28, 2016
@floam floam removed this from the next-major milestone Oct 28, 2016
@ridiculousfish
Copy link
Member

@ridiculousfish ridiculousfish commented Oct 28, 2016

Part of what's funny about this is that --wraps can come about through either function definitions or completions. We need to be able to tease these apart I think.

@zanchey zanchey added this to the fish-future milestone Jan 11, 2017
@zanchey zanchey removed this from the fish 2.5.0 milestone Jan 11, 2017
@frangio
Copy link
Contributor

@frangio frangio commented Apr 28, 2017

Any news about this?

@ridiculousfish Do you have any idea where the problem lies so I can attempt to fix it?

@floam
Copy link
Member

@floam floam commented Sep 5, 2019

Noting here that #2466 and #5843 show this can actually cause real functional issues, not just technically wrong output: Using funcsave to save a function will not show the right completions on the next session.

@ridiculousfish
Copy link
Member

@ridiculousfish ridiculousfish commented Sep 21, 2019

I decided it doesn't matter whether the wraps comes from complete or function, let's just always print it.

@ridiculousfish ridiculousfish removed this from the fish-future milestone Sep 21, 2019
@ridiculousfish ridiculousfish added this to the fish 3.1.0 milestone Sep 21, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug
Projects
None yet
Development

No branches or pull requests

7 participants