autocomplete icon indicating copy to clipboard operation
autocomplete copied to clipboard

feat: add pacman

Open clo4 opened this issue 2 years ago • 9 comments

This is still WIP. exclusiveOn and dependsOn don't quite work for pacman. We need full "options with options".

clo4 avatar Aug 24 '22 02:08 clo4

Overview

src/pacman.ts:

Info:

withfig-bot avatar Aug 24 '22 02:08 withfig-bot

Hello @SeparateRecords, thank you very much for creating a Pull Request! Here is a small checklist to get this PR merged as quickly as possible:

  • [ ] Do all subcommands / options which take arguments include the args property (args: {})?
  • [ ] Are all options modular? E.g. -a -u -x instead of -aux
  • [ ] Have all other checks passed?

Please add a 👍 as a reaction to this comment to show that you read this.

withfig-bot avatar Aug 24 '22 02:08 withfig-bot

@SeparateRecords using subcommands to describe this kind of options isn't a feasible solution?

fedeci avatar Aug 24 '22 15:08 fedeci

@fedeci does saying that is a subcommand currently work, otherwise are you able to impl this?

The cases this would have to cover are:

$ pacman -Ss
$ pacman -S --search
$ pacman --sync -s
$ pacman --sync --search

grant0417 avatar Aug 24 '22 18:08 grant0417

It works in the sense that they are correctly suggested and treated like subcommands, but for example -Ss wouldn't work while -S -s would.

fedeci avatar Aug 24 '22 19:08 fedeci

What would we need to do to support the -Ss case? That is the primary way pacman users would expect the command to work and some other arch utils work that way as well.

grant0417 avatar Aug 24 '22 21:08 grant0417

Would this be an additional flag on the subcommand or impl be default?

grant0417 avatar Aug 24 '22 21:08 grant0417

Might be interesting to have a parser directive like parseSubcommandsAsOptions which uses the option-parsing logic for subcommands?

clo4 avatar Aug 25 '22 00:08 clo4

I think for the moment additionalSuggestions may come to our help to achieve that result easily. @SeparateRecords parserDirectives would apply globally but in some cases we only want it for some options.

fedeci avatar Aug 25 '22 08:08 fedeci

@grant0417 worthwhile keeping this open? Less relevant now, since we are not focused on Linux support.

mschrage avatar Oct 12 '23 19:10 mschrage

Going to close this draft for the moment. Can always re-open. @clo4 Any interest in getting this up and running again?

brendanfalk avatar Oct 27 '23 22:10 brendanfalk