CLI: Consistent name/ID resolution #23

Merged
rawan merged 3 commits from development_fix_cli into development 2026-03-03 14:19:45 +00:00
Member

related issues: #6

This PR implements:
1- tab-completions for vm names/ids
2- name/id prefix resolution

related issues: https://forge.ourworld.tf/geomind_code/my_hypervisor/issues/6 This PR implements: 1- tab-completions for vm names/ids 2- name/id prefix resolution
feat: tab completions, prefix name/id
All checks were successful
Unit and Integration Test / test (push) Successful in 1m47s
de9bb6c96a
@ -95,0 +107,4 @@
_ => {
let ids: Vec<&str> = matches.iter().map(|s| s.id.as_str()).collect();
Err(ChvmError::VmAmbiguous(prefix.to_string(), ids.join(", ")))
}
Member

we can add sort after getting ids to make sure output is consistent each time

  - Ambiguous VM identifier 'a1b2', matches: a1b2c3d4e5f6, a1b2ffffff00
  - Ambiguous VM identifier 'a1b2', matches: a1b2ffffff00, a1b2c3d4e5f6

instead of having ordering changes each time

we can add sort after getting ids to make sure output is consistent each time ``` - Ambiguous VM identifier 'a1b2', matches: a1b2c3d4e5f6, a1b2ffffff00 - Ambiguous VM identifier 'a1b2', matches: a1b2ffffff00, a1b2c3d4e5f6 ``` instead of having ordering changes each time
rawan marked this conversation as resolved
fix: sort ids in ambiguous error, fixed tab completions with doas
All checks were successful
Unit and Integration Test / test (push) Successful in 1m51s
d421388907
fix: lazy load chvm completions for doas
All checks were successful
Unit and Integration Test / test (push) Successful in 2m28s
aaa7c5e05a
rawan merged commit ed639c8990 into development 2026-03-03 14:19:45 +00:00
rawan deleted branch development_fix_cli 2026-03-03 14:19:45 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_code/my_hypervisor!23
No description provided.