Package: sensible-utils Version: 0.0.17+nmu1 Severity: normal Dear Maintainer,
According to environ(7), "Any string acceptable as a command_string operand to the sh -c command shall be valid" as a value of $EDITOR. I take it from this that, if 'sh -c "$EDITOR <target_file>"' works, then that is a valid value for $EDITOR. The implication is therefore that $EDITOR may legitimately contain all sorts of things that are not correctly supported by sensible-editor. Indeed, one could write an entire shell script in there and call it valid; however the thing I particularly care about right now is the ability to pass an empty argument to my editor. I think I *should* be able to set EDITOR='/usr/bin/emacsclient -a "" -c' and have emacsclient be passed an empty string as its second argument; instead, it is passed the literal string "". In a similar vein I think it should be possible to include whitespace in the command in $EDITOR with EDITOR='"/command/with spaces"'. Once again, this doesn't work correctly in sensible-editor. It's worth noting that other commands which interpret $EDITOR (such as git-commit) *do* handle these values work correctly, I think that what needs to happen is, rather than running $EDITOR directly, sensible-editor should do: Run sh -c "${EDITOR:-${SELECTED_EDITOR:-editor}} $@" -- System Information: Debian Release: 12.10 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 6.12.12+bpo-amd64 (SMP w/16 CPU threads; PREEMPT) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled -- no debconf information