Local defaults for --tty and other command line options
- Dominant language
- Go
- Stars
- 21.9k
- Forks
- 957
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 53
Description
### Description
My workflow is:
1. Create a lima yaml, usually for testing something, by copying another yaml and editing it. I want to keep the yaml around for creating more vms later, maybe put in in version control.
2. Create the vm from the yaml
I never want to edit the yaml during creation, but I forget to add --tty=0 a lot. Editing the yaml means your changes are saved only in ~/.lima/name/lima.yaml, and I like to treat anything under ~/.lima as ephemeral.
It would be useful if --tty=false was the default, but this may not be best for everyone. Having a local default will make it easy to adapt lima to different users. This option name is also not great, it should be about editing the yaml, not about using in a terminal.
Current behavior is to default to tty=true when using in a terminal:
```go
rootCmd.PersistentFlags().Bool("tty", isatty.IsTerminal(os.Stdout.Fd()), "Enable TUI interactions such as opening an editor. Defaults to true when stdout is a terminal. Set to false for automation.")
```
We can change it to:
- read a configuration file (e.g. ~/.lima/_config/local.yaml)
- consider the local default for tty and the terminal capabilities
Contributor guide
Assessment
This issue has not been assessed yet.