redo icon indicating copy to clipboard operation
redo copied to clipboard

Re-implement rc_splitwords to accommodate arbitrarily many words

Open spacefrogg opened this issue 5 years ago • 1 comments

Tested with zsh, bash, dash, ash (busybox) and /bin/sh pointing to bash. Test patterns:

rc_splitwords '"a b"' "'c d'" 'e\ f' "g\ h" i\\\ j

rc_splitwords $(seq 10000)
rc_splitwords "$(seq 10000)"

For the long sequence tests, performance was still a sub-second response with bash being considerably slower than the other shells.

As a side note: I object to the suppression of empty arguments, as these might be valid input, but kept it for compatibility.

spacefrogg avatar Aug 06 '20 21:08 spacefrogg

Ping.

spacefrogg avatar Nov 12 '20 12:11 spacefrogg