aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/app
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-06-20 19:08:47 +0900
committerOphestra <cat@gensokyo.uk>2026-06-20 19:08:47 +0900
commit4e09241e5f55ad71d530e1394c37cfe1d46c599e (patch)
tree7fe58c8e8ab6055f64aa55cacbedca61402336f1 /cmd/app
parentbd4b300ea6ab273fb820912851586188d81ff581 (diff)
cmd/app: optional interactive shell
Enabling this unconditionally causes the new configuration prompt to be shown when started from a terminal, and is generally less robust than not reading zshrc unless explicitly required. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd/app')
-rw-r--r--cmd/app/app.go13
-rw-r--r--cmd/app/app_test.go2
2 files changed, 10 insertions, 5 deletions
diff --git a/cmd/app/app.go b/cmd/app/app.go
index d9ed70c2..6340ed90 100644
--- a/cmd/app/app.go
+++ b/cmd/app/app.go
@@ -74,7 +74,7 @@ func parse(id string, base *check.Absolute, r io.Reader) (*hst.Config, error) {
Shell: shell,
Home: home,
Path: shell,
- Args: []string{"zsh", "-ic"},
+ Args: []string{"zsh", "-c"},
Flags: hst.FCoverRun,
},
@@ -108,10 +108,11 @@ func parse(id string, base *check.Absolute, r io.Reader) (*hst.Config, error) {
}
c.Container.Args = append(c.Container.Args, s.Text(), "")
- var flagGPU, flagSystemBus bool
+ var flagInteractive, flagGPU, flagSystemBus bool
flags := map[string]*bool{
- "gpu": &flagGPU,
- "system_bus": &flagSystemBus,
+ "interactive": &flagInteractive,
+ "gpu": &flagGPU,
+ "system_bus": &flagSystemBus,
}
for s.Scan() {
@@ -259,6 +260,10 @@ func parse(id string, base *check.Absolute, r io.Reader) (*hst.Config, error) {
return nil, err
}
+ if flagInteractive {
+ c.Container.Args[1] += "i"
+ }
+
if flagGPU {
c.Container.Filesystem = append(c.Container.Filesystem, []hst.FilesystemConfigJSON{
{FilesystemConfig: &hst.FSBind{
diff --git a/cmd/app/app_test.go b/cmd/app/app_test.go
index 60b2376f..f5e94789 100644
--- a/cmd/app/app_test.go
+++ b/cmd/app/app_test.go
@@ -112,7 +112,7 @@ talk com.canonical.Unity
Home: hst.AbsPrivateTmp.Append("home"),
Path: fhs.AbsRoot.Append("bin", "zsh"),
Args: []string{
- "zsh", "-ic",
+ "zsh", "-c",
"exec Discord --ozone-platform-hint=wayland",
"",
},