vsed: stop collapsing whitespace

MCVE:
	printf '%s  %s\n' a b >afile
	vsed -i -e '/a  b/d' afile

Expect:
- afile should be empty
Actual:
- afile is not empty
This commit is contained in:
Đoàn Trần Công Danh 2021-02-17 18:22:49 +07:00
parent f2b1408938
commit f9da7ff3bb

View file

@ -8,7 +8,7 @@
vsed() {
local files=() regexes=() OPTIND OPTSTRING="ie:" has_inline=
eval set -- $(getopt -s bash "$OPTSTRING" "$@");
eval set -- "$(getopt -s bash "$OPTSTRING" "$@")";
while getopts "$OPTSTRING" opt; do
case $opt in