4 ms·
The examples are all undeniably verbose, but the source shows that many short options are also supported, specifically to copy those you would expect if migrati
by darrenf 3y ago
The examples are all undeniably verbose, but the source shows that many short options are also supported, specifically to copy those you would expect if migrating from the alternatives: https://github.com/lizmat/App-Rak/blob/main/lib/App/Rak.rakumod#L31 https://github.com/lizmat/App-Rak/blob/main/lib/App/Rak.raku...
So
rak -C2 foo
will do what you expect.
[Edited to add] Also, the `\b...\b` form is shorter with rak - as the README also states where it documents this pattern form:
> §string
> If the pattern starts with §, then it indicates that the string should occur as a word (with word-boundaris on both ends) in the item. Basically a shortcut to specifying string --type=words. Any --smartcase, --smartmark, --ignorecase or --ignoremark arguments will be honoured.
- mkl 3y agoYes, I'm mainly complaining at the choice of examples, which don't seem to back up the claim of being "rg on steroids" at all. Typing § is not very easy on most keyboards, and is actually impossible on some keyboard-OS combinations (including mine): https://en.wikipedia.org/wiki/Section_sign#Keyboard_entry https://en.wikipedia.org/wiki/Section_sign#Keyboard_entry
- 2colours 3y agoSome diversity doesn't hurt, though. On my keyboard, it's actually easier to type than the backslash for starters.
- switch007 3y ago> §string > If the pattern starts with §, Is it April 1st already?!
- ta8645 3y agoRaku embraces Unicode in a big way, and probably influenced this decision. I wonder if keyboards in the future will settle on a way to provide access to more characters, than is currently common.
- throwawaaarrgh 3y agoFwiw, § is ASCII code 167, the "Section symbol". Long been used as a record separator and section marker. I agree the keyboard thing is really annoying. Maybe the West should investigate the efforts China has put into different typing systems.
- burntsushi 3y agoThat's not correct. ASCII has only 128 codepoints and its maximum value is 127 or 0x7F. Code 167 is not part of ASCII. You're probably thinking of ISO 8859-1. U+00A7 (codepoint 167) is also the Unicode codepoint for §. Its use on this very web page is via Unicode and the UTF-8 encoding as the bytes \xC2\xA7. (This is meant as a narrow correction. It doesn't really change the broader point that § is not exactly easy to type on most keyboards. Whether its ASCII or not.)
- throwawaaarrgh 3y agoSorry, you're right. I guess I meant 8859-1 as opposed to Windows codepages or Unicode-exclusive. My Western bias is showing as I don't know if there are old locales that wouldn't have it that would affect any international users, but I assume not?
- lizmat 3y agoFWIW, on some MacBook Pro keyboards, the § is right next to 1: https://keyshorts.com/blogs/blog/37615873-how-to-identify-macbook-keyboard-localization#us-international https://keyshorts.com/blogs/blog/37615873-how-to-identify-ma...