Skip to content

Conversation

@AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Jan 24, 2023

$ limactl ls --format='{{.SSHConfigFile}}' default
/Users/example/.lima/default/ssh.config

@AkihiroSuda AkihiroSuda added this to the v0.15 (tentative) milestone Jan 24, 2023
@AkihiroSuda AkihiroSuda requested review from a team and jandubois January 26, 2023 11:28
@jandubois
Copy link
Member

jandubois commented Jan 29, 2023

I understand why you added this to the show-ssh command, but it feels somewhat off to me. All other format options show the actual options, whereas this one shows a filename.

Also, to show the name of the identity file you run1:

$ limactl ls --format '{{.IdentityFile}}' default
/Users/jan/.lima/_config/user

But to get the name of the config file you run:

$ limactl show-ssh --format=config-file default
/Users/jan/.lima/default/ssh.config

This seems rather inconsistent to me. But I don't have a suggestion how to improve this right now.

Footnotes

  1. This is actually broken right now in master, but was still working in 0.14.2; will file a bug for it after looking some more (e.g. LimaHome is also broken; probably all "global" fields). Update: fixed in Add global fields to instance data before executing template #1339.

@AkihiroSuda AkihiroSuda marked this pull request as draft January 29, 2023 13:47
@AkihiroSuda AkihiroSuda changed the title limactl show-ssh: add --format=config-file Write ~/.lima/<INSTANCE>/ssh.config Jan 30, 2023
@AkihiroSuda AkihiroSuda changed the title Write ~/.lima/<INSTANCE>/ssh.config Write ~/.lima/<INSTANCE>/ssh.config Jan 30, 2023
@AkihiroSuda AkihiroSuda marked this pull request as ready for review January 30, 2023 13:15
@AkihiroSuda
Copy link
Member Author

Updated

$ limactl ls --format='{{.SSHConfigFile}}' default
/Users/example/.lima/default/ssh.config

@AkihiroSuda AkihiroSuda requested a review from jandubois January 30, 2023 13:16
@AkihiroSuda AkihiroSuda added the area/cli limactl CLI user experience label Jan 30, 2023
```console
$ limactl ls --format='{{.SSHConfigFile}}' default
/Users/example/.lima/default/ssh.config
```

Signed-off-by: Akihiro Suda <[email protected]>
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@jandubois jandubois merged commit fcbf3d8 into lima-vm:master Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli limactl CLI user experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants