gum icon indicating copy to clipboard operation
gum copied to clipboard

gum input - missing cursor when running in container images (since v0.10.0)

Open ThomasBuchinger opened this issue 1 year ago • 1 comments

Describe the bug I am writing a script that uses gum input --value "default-value". The default value must be edited by the user.

The problem is, that there is no cursor on screen, making it hard to know where the cursor is exactly. The cursor still exists and it can be moved by pressing the arrow keys and counting the number of characters, but there is no on screen indication for the current cursor position

  • The bug only exists when running inside a container image (tested on ubuntu:22.04 and charmcli/gum:v0.10.0)
  • Running gum v0.10.0 without a container works
  • Using the older charmcli/gum:v0.9.0 image works
  • The bug seems to still exists on main-branch. Tested with docker.io/golang image and go install github.com/charmbracelet/gum@main

To Reproduce

# Produces the bug
podman run -it --rm  docker.io/charmcli/gum:v0.10.0 input

gum_cursorbug_v0 10 0

# Produces the bug
podman run -it --rm docker.io/golang
go install github.com/charmbracelet/gum@main
gum input

gum_cursorbug_main

# v0.9.0 image works
podman run -it --rm  docker.io/charmcli/gum:v0.9.0 input

gum cursorbug_v0 9 0

# The native binary works
$ ./gum --version
gum version v0.10.0 (0f0f8e9)
$ ./gum input                     

gum_cursorbug_native

Expected behavior There should be a blinking box, showing the current position of the cursor

Desktop (please complete the following information):

  • Fedora37, podman 4.5.0
  • RHEL 8.4, podman 4.4.3

Additional context I don't really have access to a different Linux distro or container runtime at the moment. If there are any additional setting I can try, let me know

ThomasBuchinger avatar Jul 07 '23 19:07 ThomasBuchinger

It looks like you're trying to run gum in a non-interactive environment.

xabru avatar Sep 02 '23 19:09 xabru