|
|
@@ -7,7 +7,7 @@ fixnl () {
|
|
7
|
7
|
local nlcount;
|
|
8
|
8
|
local lastchr;
|
|
9
|
9
|
local single=keep;
|
|
10
|
|
- case $arg in
|
|
|
10
|
+ case $arg in
|
|
11
|
11
|
-c | --chop-single)
|
|
12
|
12
|
single=chop
|
|
13
|
13
|
;;
|
|
|
@@ -21,7 +21,7 @@ fixnl () {
|
|
21
|
21
|
cat > "$cache";
|
|
22
|
22
|
nlcount=$(<"$cache" wc -l);
|
|
23
|
23
|
lastchr=$(<"$cache" tail -c1 | hexdump -e '"%02x"');
|
|
24
|
|
- case $nlcount:$lastchr:$single in
|
|
|
24
|
+ case $nlcount:$lastchr:$single in
|
|
25
|
25
|
0:??:*)
|
|
26
|
26
|
cat "$cache"
|
|
27
|
27
|
;;
|
|
|
@@ -42,7 +42,7 @@ fixnl () {
|
|
42
|
42
|
rm "$cache"
|
|
43
|
43
|
}
|
|
44
|
44
|
|
|
45
|
|
-main () {
|
|
|
45
|
+main () {
|
|
46
|
46
|
local body;
|
|
47
|
47
|
body="$(xclip -o)"
|
|
48
|
48
|
# declare -p body >~/body.declare
|