autocomplete icon indicating copy to clipboard operation
autocomplete copied to clipboard

[nc] Create completion spec

Open brendanfalk opened this issue 4 years ago • 2 comments

Sanity checks

  • [X] My issue relates to a specific CLI completion spec (e.g. git checkout is missing options in git completion spec). If your issue is more general, please create your issue here: withfig/fig
  • [X] I have searched github.com/withfig/autocomplete/issues and there are no duplicates of my issue
  • [ ] I would like to work on this.

What CLI tool does this relate to?

nc

Which statement makes the most sense?

This completion spec does not exist

Issue Details

create autocomplete for nc and maybe also netcat

brendanfalk avatar Feb 23 '22 02:02 brendanfalk

@brendanfalk I'm trying do do this, but nc has a weird way of doing it's arguments.

The destination argument is not compatible with the -l or -L options, but I'm not sure if I can make an argument incompatible with an option. I could add isOptional: true but that means it would still show up, I think the only way would be with a generator.

Also, with the -l, -L options, the port can either be passed as an argument or with the -p option.

bolshoytoster avatar Feb 27 '22 13:02 bolshoytoster

Hey @bolshoytoster, we do not have a simple way to exclude parent arguments currently so in my opinion isOptional: true is quite good. It still provides arg suggestions but doesn't force the user to add it. it is not a determinant aspect to make the PR merged in!

fedeci avatar Mar 01 '22 13:03 fedeci