beringresearch / macpine

Lightweight Linux VMs on MacOS

Home Page:https://beringresearch.github.io/macpine/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parse multiple VMs in cli args

idroz opened this issue · comments

commented

@maxzinkus I created a few issues - would be great if you could grab one or two. Let me know and I'll assign.

I think for now edit and info could stay as single instance commands as they are designed to operate/modify one VM at a time. But let me know if it would be more user-friendly for them to handle a list of VMs.

Regarding info: You're right, this should probably stay as-is.

Regarding edit: vim can very nicely handle being passed many filenames. It opens each in a new buffer, which can be navigated. Further, opening many VM configs at once would allow one to run a vim/Ex command in all configs at once:

alpine edit vm1 vm2 vm3
# ... vm1 through 3 configs are open in 3 separate vim buffers ...
# in Vim, change all sshpassword fields (line 11) from the default "root" to "ssh::alpine" to use ssh-agent
:bufdo 11 | s/\"root\"/\"ssh::alpine\"/ | w

I probably can't pick up those tasks right now. But, a single command-line helper (e.g. ParseVMNameArgs could probably be re-used across multiple commands to make this easy.

Linking sub-issues:

  • alpine delete: #84
  • alpine start: #87
  • alpine stop: #88
  • alpine publish: #89