colorls icon indicating copy to clipboard operation
colorls copied to clipboard

Auto-completion for fish shell

Open athityakumar opened this issue 7 years ago • 5 comments

Description

The auto-completion for flags and paths can be provided for the fish shell via the getopt plugin.

  • Relevant Issues : #160
  • Relevant PRs : (none)
  • Type of issue :
    • [ ] Installation
    • [ ] Font-related
    • [x] Feature request
    • [ ] Bug in existing feature
    • [ ] Developer mode : Code quality / Tests / Documentation

athityakumar avatar Nov 28 '17 14:11 athityakumar

https://fishshell.com/docs/current/commands.html#complete

This is probably a better idea than using the getopt plugin? That way no extra plugin has to be installed, I think.

dkowis avatar Jan 19 '18 23:01 dkowis

+1 for this feature

SpaceWhite avatar May 17 '18 09:05 SpaceWhite

This issue is interesting to me. I agree that adding completions to Fish natively would be better than adding them through an external plugin.

To do that we have to add this feature to Fish directly. I see PR 179 has a template of what would be added. Is that still good or does it need to be modified to be added to Fish?

adcpe avatar Feb 09 '23 20:02 adcpe

I don't think it needs to be added directly to fish. I think you just need to provide the completions file to be loaded.

https://fishshell.com/docs/current/completions.html#completion-own

It's been a long long time since I looked at this tho, heh

dkowis avatar Feb 09 '23 20:02 dkowis

It doesn't need to be added Fish, but it would be the best way because it means the user doesn't have to make any effort.

The other way would be add a command to colorls that copies the completions to $HOME/.config/fish/completions/.

Any of the two seem cleaner than adding an external plugin like getopt, as suggested.

adcpe avatar Feb 09 '23 20:02 adcpe