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:
parent
2e5379bf4e
commit
675c7b3c87
1 changed files with 2 additions and 2 deletions
|
@ -171,13 +171,13 @@ nocom() ### @- strip single-line C-like and shell-like comments.
|
||||||
{ grep -Ev --line-buffered --color=never "^[[:space:]]*(//|#)" "$@"; }
|
{ grep -Ev --line-buffered --color=never "^[[:space:]]*(//|#)" "$@"; }
|
||||||
|
|
||||||
jrep() ### @- extract strings comprised of basic ASCII or Japanese codepoints.
|
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.
|
bomb() ### @- add a Byte-Order Mark to a file.
|
||||||
{ uconv -f utf-8 -t utf-8 --add-signature "$@"; }
|
{ uconv -f utf-8 -t utf-8 --add-signature "$@"; }
|
||||||
|
|
||||||
cleanse() ### @- strip unprintable and non-ASCII characters.
|
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.
|
double() ### @- print every line twice. <br/> print every line twice.
|
||||||
### **NOTE:** there also exists a double(1) program provided by
|
### **NOTE:** there also exists a double(1) program provided by
|
||||||
|
|
Loading…
Add table
Reference in a new issue