-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sed -E does not work with older versions of sed #87
Comments
I'm no regex-pro, but what about: h1=$(history -s foo$'\n'bar$'\n'lich; HISTTIMEFORMAT= history 1);
<<< "$h1" sed '1 s/^ *[0-9]\{1,\}[\* ] //';
<<< "$h1" sed '1 s/^ *[0-9]*[\* ] //'; |
@steinarvk thanks for reporting! Can one of you guys submit the PR? |
I went with |
@dimo414 that'd be awesome, please do! 🙏 |
This is an issue introduced with my earlier commit 1c9db27 . It uses the -E flag for sed (--regexp-extended), but this is not supported by every version of sed. Specifically I've observed it to fail on GNU sed 4.1.3.
It's probably better to use a variant of d630's suggestion from #79 .
The text was updated successfully, but these errors were encountered: