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 Something that's not working as intended
Milestone

Comments

@lilyball
Copy link
Contributor

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

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

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
@krader1961 krader1961 added the bug Something that's not working as intended label May 24, 2016
@floam floam modified the milestones: next-2.x, next-major Oct 28, 2016
@ridiculousfish
Copy link
Member

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 modified the milestones: fish-future, fish 2.5.0 Jan 11, 2017
@frangio
Copy link
Contributor

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 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

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

@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 Something that's not working as intended
Projects
None yet
Development

No branches or pull requests

7 participants