unexpected behavior from regexp substitution #905
-
I haven't seen this behavior documented anywhere, so I suspect it's a bug, but I'll start here in case it's PEBKAC. I wanted to remove all leading zeroes from a string of integers, so I was able to get what I needed with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You're right on both counts.
It's also amongst some of Murex's oldest code: https://github.com/lmorg/murex/blob/master/shell/history/vars.go Given how old the code is and how it's undocumented, I'm definitely open to revisiting / reworking this implementation. One thought I'd been having lately was having this a feature of |
Beta Was this translation helpful? Give feedback.
You're right on both counts.
^
is used as a token for history variables. And you're right that it's undocumented.It's also amongst some of Murex's oldest code: https://github.com/lmorg/murex/blob/master/shell/history/vars.go
Given how old the code is and how it's undocumented, I'm definitely open to revisiting / reworking this implementation.
One thought I'd been having lately was having this a feature of
readline
. Making it a command mode likevi
's:
command mode. So it could be invoked via[esc]: