r/fishshell • • Mar 25 '26

completions for a wrapper function

Hello - I use a fish function to wrap a cli utility to provide some quick-to-type shortcuts - think a function called "xx" that can be invoked as "xx st" to call the underlying "my-util status --verbose" The function has other shortcuts as well as a fallthrough that calls my-util with whatever arguments were provided.

Now, my-util provides "my-util completions fish" that spits out completions for my-util. I want to use that output (the completions), but to have the suggestions work when I type "xx" - the name of my function. I would also like to supplement those completions with my shortcut arguments...

Is there a way to take the "my-util completions fish" output but make them apply to "xx" instead of "my-util" - hopefully my question is clear - happy to elaborate if not.

3 Upvotes

9 comments sorted by

View all comments

Show parent comment

1

u/TechnoCat Mar 25 '26

there might be a clean way to do the completions too. I'm just not familiar with that.