gum
gum copied to clipboard
Unhandled trailing newline from stdin in `gum input`
Describe the bug
echo foo | gum input gives you a input prompt where the starting value has trailing whitespace.
To Reproduce
- trailing whitespace:
echo foo | gum input - no trailing whitespace:
gum input --value="$(echo foo)"
Expected behavior
The final trailing newline from stdin should be filtered. The posix standard stated that all text files (and thus in turn stdout) must feature a trailing newline, and tools should respect this.
Desktop:
- OS: Manjaro and NixOS