peter-bread / gamon

GitHub Account Manager
MIT License
3 stars 0 forks source link

redefine some functionality #21

Open peter-bread opened 9 months ago

peter-bread commented 9 months ago

Since making changes to the shell script, some functionality is no longer required in the Go code.

For example, there is now no need to store a text file contain users, since they are stored by gh in ~/.config/gh/hosts.yml (by default).

peter-bread commented 9 months ago

For gam account add, this could:

  1. Call gh auth login
  2. Read users (keys) in ~/.config/gh/hosts.yml
  3. Call gam create-acc-dirs (maybe add --no-dirs flag to disable this???)
peter-bread commented 9 months ago

I think I may only need two commands:

  1. Print out the embedded script
  2. Set the root directory and output what the user needs in their shell .rc file
peter-bread commented 9 months ago

For initial release v1.0.0, included a single command script for generating the script.

Via cobra, completion and help are also commands.