Alias for 'self'
pithyless opened this issue · comments
I really like how well this reads:
pru <map> <reduce>
Have you considered adding an alias for those times when all we want is the reduce (e.g. .
)?
Maybe it's just me, but this is easier for me to type without needing to pause:
ls -al | pru . size
Which I think of a shorthand for:
ls -al | pru /./ size
vs the alternatives:
ls -al | pru self size
ls -al | pru -r size
It would have to be a hard-coded exception, but period
by itself would not conflict with anything else you might want to do. I don't mind submitting a short patch if you agree with the idea.
All in all, this is a very minor issue. Thanks for the gem! ;-)
pru '' 'size' does the same, feels even simpler to me, you can see that 'nothing' is happening in the mapping step
hmmm, I didn't think of using empty quotes. I guess it's alright.
Feel free to close this issue, and thanks again for the gem.
I added docs/specs for it :)