1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2025-02-05 07:43:22 -08:00

prefer single quotes around arguments with escapes

This commit is contained in:
Connor Olding 2024-05-17 20:05:57 -07:00
parent 2e5379bf4e
commit 675c7b3c87

View file

@ -171,13 +171,13 @@ nocom() ### @- strip single-line C-like and shell-like comments.
{ grep -Ev --line-buffered --color=never "^[[:space:]]*(//|#)" "$@"; }
jrep() ### @- extract strings comprised of basic ASCII or Japanese codepoints.
{ grep -aPo "[\x{20}-\x{7E}\x{4E00}-\x{9FFF}\x{3040}-\x{30FF}]+" "$@"; }
{ grep -aPo '[\x{20}-\x{7E}\x{4E00}-\x{9FFF}\x{3040}-\x{30FF}]+' "$@"; }
bomb() ### @- add a Byte-Order Mark to a file.
{ uconv -f utf-8 -t utf-8 --add-signature "$@"; }
cleanse() ### @- strip unprintable and non-ASCII characters.
{ tr -cd "\11\12\15\40-\176" "$@"; }
{ tr -cd '\11\12\15\40-\176' "$@"; }
double() ### @- print every line twice. <br/> print every line twice.
### **NOTE:** there also exists a double(1) program provided by