Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse multiple VMs in cli args #91

Closed
idroz opened this issue Mar 2, 2023 · 3 comments · Fixed by #112
Closed

Parse multiple VMs in cli args #91

idroz opened this issue Mar 2, 2023 · 3 comments · Fixed by #112
Assignees

Comments

@idroz
Copy link
Collaborator

idroz commented Mar 2, 2023

@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.

@maxzinkus
Copy link
Collaborator

maxzinkus commented Mar 2, 2023

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

@maxzinkus
Copy link
Collaborator

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.

@maxzinkus
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants