2 ms·
I'm gonna say the example code is in zsh, where `$foo:r` means "remove the extension from $foo". See the `r` entry here: https://zsh.sourceforge.io/Doc/Release/
by darrenf 3y ago
I'm gonna say the example code is in zsh, where `$foo:r` means "remove the extension from $foo". See the `r` entry here: https://zsh.sourceforge.io/Doc/Release/Expansion.html#Modifiers https://zsh.sourceforge.io/Doc/Release/Expansion.html#Modifi...
% foo=foo.md
% echo $foo:r
foo
- 38 3y agoProbably not a good idea to post code using random shells when giving examples. User should specify zsh, or just use posix.
- arp242 3y agoIt's just an illustrative example that I didn't even bother to check for syntax errors, and I'm just used to zsh syntax so I don't always remember to translate to POSIX, and quite frankly, it doesn't matter because no one will or should run this script, because it's just illustrative, which is obvious to anyone. You're making a big deal out of nothing.
- 38 3y ago> Typically this term refers to a rhetorical strategy where the speaker attacks the character, motive, or some other attribute of the person making an argument rather than attacking the substance of the argument itself. https://wikipedia.org/wiki/Ad_hominem https://wikipedia.org/wiki/Ad_hominem