fix: read -e -i stores into variable directly, not stdout
gates / consistency-and-conventions (push) Successful in 2m34s

edited="\$(read ...)" was always empty because read writes to a variable
name, not stdout. Changed to: read -e -p "Command: " -i "\$flat" edited
which stores directly into \$edited.
This commit is contained in:
Your Name
2026-08-26 04:42:18 -04:00
parent 9564880ebf
commit d84a35efce
+1 -1
View File
@@ -411,7 +411,7 @@ _inject_command() {
if [ -w /dev/tty ]; then
local edited=""
printf '\n' >&2
if edited="$(read -e -p "Command: " -i "$flat" </dev/tty 2>/dev/null)"; then
if read -e -p "Command: " -i "$flat" edited </dev/tty 2>/dev/null; then
[ -n "$edited" ] || { printf '%s\n' "Empty command — skipped." >&2; return 0; }
printf '%s\n' "$edited"
run eval "$edited"