Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: Filespecs are not properly quoted
Filespec(s, on individual lines) need to be shell-quoted, as they are passed (through xargs) to the opener. We need to use null-termination so that xargs doesn't do special handling of quotes. -I (implying -L 1) is _not_ enough! As our input is newline-delimited, use tr to translate to null separators, then feed to xargs -0. For the editor (which cannot simply be launched but needs to use the actual terminal so that the editor will be launched inside and therefore visible inside the pane), it's even worse: The concluding CR is only appended once, not for each file. Files should not be edited separately, anyway, but passed as multiple argments to a single editor instance. Also, the editor call itself should disable name lookup (send-keys -l) so that filenames that resemble a Tmux key aren't accidentally translated into a keypress. Inspired by tmux-plugins#38 (which provides a bad solution, though).
- Loading branch information