summary refs log tree commit diff stats
path: root/pictor.pl
Commit message (Collapse)AuthorAgeFilesLines
* Use die instead of warn & exit, simplify the scriptAndinus2020-05-101-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | Using die makes the program shorter & simpler, initial reason for not using die was that it exits with 255 code which generally means: "We died, dunno why" & I thought I knew why so I should exit with something else. After talking to a few people looks like it doesn't matter much, I myself have never written a program that checks for a specific exit code so I switched to using die. - print $line =~ s/\t/: /r and - $total_acronyms++ if - ($line =~ /^\Q${term}\E\t/i); + if ($line =~ /^\Q${term}\E\t/i) { + print $line =~ s/\t/: /r; + $total_acronyms++; + } This change was made because the previous version didn't do what I think it did. I could simply replace and with a comma & it would be equivalent to the current version but then why not use the current version? This looks better imo & will be easier to understand later.
* Refine pledge permissionsAndinus2020-05-101-3/+9
|
* Print error message if no match is foundAndinus2020-05-101-2/+10
|
* Support "pictor is term" syntaxAndinus2020-05-061-0/+6
| | | | | | "pictor is term" looks better, even better if user renames this to wtf then user would be able to run "wtf is wtf" instead of the boring "pictor wtf" or "wtf wtf".
* Use \t instead of \s & make the output neaterAndinus2020-05-061-3/+5
| | | | | | | | | We replace \t with ": " before printing to make the output neater. Also \t is now used to match against instead of /s because it's what defined in wtf manual. Talking about OpenBSD 6.6 wtf manual here, I assume it will be the same for original wtf.
* Fix variable nameAndinus2020-05-061-5/+5
| | | | | | | Variables shouldn't be called file, it's bad practice. So we use $fn for filename. http://perl-begin.org/tutorials/bad-elements/#sources_of_advice
* Make script executableAndinus2020-05-061-0/+0
|
* Initial commitAndinus2020-05-061-0/+64