| 137 | + t t |
| 138 | 6 Compress tagged subdirectories (tar.xz) |
| 139 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 140 | for tar in %t; do |
| 141 | tar cf - "$tar" | xz -f > "$tar.tar.xz" && \ |
| 142 | echo "../$tar.tar.xz created." |
| 143 | done |
| 144 | |
| 145 | + ! t t |
| 146 | ^ Compress the current subdirectory (tar.xz using 7z) |
| 147 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 148 | Pwd=`basename %d /` |
| 149 | echo -n "Name of the compressed file (without extension) [$Pwd]: " |
| 150 | read tar |
| 151 | [ "$tar"x = x ] && tar="$Pwd" |
| 152 | cd .. && \ |
| 153 | tar cf - "$Pwd" | ${P7ZIP} a -si -txz -m0=lzma2 -ms=on $COMPRESS_OPTS_7Z "$tar.tar.xz" && \ |
| 154 | echo "../$tar.tar.xz created." |
| 155 | |
| 156 | + t t |
| 157 | ^ Compress tagged subdirectories (tar.xz using 7z) |
| 158 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 159 | for tar in %t; do |
| 160 | tar cf - "$tar" | ${P7ZIP} a -si -txz -m0=lzma2 -ms=on $COMPRESS_OPTS_7Z "$tar.tar.xz" && \ |
| 161 | echo "$tar.tar.xz created." |
| 162 | done |
| 163 | |
| 164 | + ! t t |
105 | | = f \.c$ & t r |
106 | | + f \.c$ & t r & ! t t |
107 | | c Compile and link current .c file |
108 | | make "`basename %f .c`" 2>/dev/null || cc -O -o "`basename %f .c`" %f |
| 191 | + t t |
| 192 | 8 Compress tagged subdirectories (tar.lzo) |
| 193 | for tar in %t; do |
| 194 | tar cf - "$tar" | lzop -f > "$tar.tar.lzo" && \ |
| 195 | echo "$tar.tar.lzo created." |
| 196 | done |
| 197 | |
| 198 | + ! t t |
| 199 | 9 Compress the current subdirectory (7z) |
| 200 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 201 | Pwd=`basename %d /` |
| 202 | echo -n "Name of the compressed file (without extension) [$Pwd]: " |
| 203 | read tar |
| 204 | [ "$tar"x = x ] && tar="$Pwd" |
| 205 | cd .. && \ |
| 206 | ${P7ZIP} a $COMPRESS_OPTS_7Z "$tar.7z" "$tar" && \ |
| 207 | echo "../$tar.7z created." |
| 208 | |
| 209 | + t t |
| 210 | 9 Compress tagged subdirectories (7z) |
| 211 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 212 | for tar in %t; do |
| 213 | ${P7ZIP} a $COMPRESS_OPTS_7Z "$tar.7z" "$tar" && \ |
| 214 | echo "$tar.7z created." |
| 215 | done |
| 216 | |
| 217 | + ! t t |
| 218 | ( Compress & Encrypt the current subdirectory (7z) |
| 219 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 220 | Pwd=`basename %d /` |
| 221 | echo -n "Name of the compressed file (without extension) [$Pwd]: " |
| 222 | read tar |
| 223 | [ "$tar"x = x ] && tar="$Pwd" |
| 224 | cd .. && \ |
| 225 | ${P7ZIP} a -p -mhe $COMPRESS_OPTS_7Z "$tar.7z" "$tar" && \ |
| 226 | echo "../$tar.7z created." |
| 227 | |
| 228 | + t t |
| 229 | ( Compress & Encrypt tagged subdirectories (7z) |
| 230 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 231 | for tar in %t; do |
| 232 | ${P7ZIP} a -p -mhe $COMPRESS_OPTS_7Z "$tar.7z" "$tar" && \ |
| 233 | echo "$tar.7z created." |
| 234 | done |
| 235 | |
| 236 | + ! t t |
| 237 | 0 Compress the current subdirectory (zip) |
| 238 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 239 | Pwd=`basename %d /` |
| 240 | echo -n "Name of the compressed file (without extension) [$Pwd]: " |
| 241 | read tar |
| 242 | [ "$tar"x = x ] && tar="$Pwd" |
| 243 | cd .. && \ |
| 244 | zip -r "$tar.zip" "$tar" && \ |
| 245 | echo "../$tar.zip created." |
| 246 | |
| 247 | + t t |
| 248 | 0 Compress tagged subdirectories (zip) |
| 249 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 250 | for tar in %t; do |
| 251 | zip -r "$tar.zip" "$tar" && \ |
| 252 | echo "$tar.zip created." |
| 253 | done |
| 254 | |
| 255 | + ! t t |
| 256 | ) Compress the current subdirectory (zip using 7z) |
| 257 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 258 | Pwd=`basename %d /` |
| 259 | echo -n "Name of the compressed file (without extension) [$Pwd]: " |
| 260 | read tar |
| 261 | [ "$tar"x = x ] && tar="$Pwd" |
| 262 | cd .. && \ |
| 263 | ${P7ZIP} a -tzip "$tar.zip" "$tar" && \ |
| 264 | echo "../$tar.zip created." |
| 265 | |
| 266 | + t t |
| 267 | ) Compress tagged subdirectories (zip using 7z) |
| 268 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 269 | for tar in %t; do |
| 270 | ${P7ZIP} a -tzip "$tar.zip" "$tar" && \ |
| 271 | echo "$tar.zip created." |
| 272 | done |
160 | | %view{ascii,nroff} MANROFFOPT='@MAN_FLAGS@' MAN_KEEP_FORMATTING=1 man -P cat "$MAN" |
161 | | |
162 | | = f \.gz$ & t r |
163 | | + ! t t |
164 | | n Inspect gzip'ed newsbatch file |
165 | | dd if=%f bs=1 skip=12 | zcat | ${PAGER-more} |
166 | | # assuming the cunbatch header is 12 bytes long. |
167 | | |
168 | | = t r & |
169 | | + ! t t |
170 | | h Strip headers from current newsarticle |
171 | | CHECK=`awk '{print $1 ; exit}' %f` 2>/dev/null |
172 | | case "$CHECK" in |
173 | | Newsgroups:|Path:) |
174 | | I=`mktemp "${MC_TMPDIR:-/tmp}/news.XXXXXX"` || exit 1 |
175 | | cp %f "$I" && sed '/^'"$CHECK"' /,/^$/d' "$I" > %f |
176 | | [ "$?" = "0" ] && rm "$I" |
177 | | echo %f": header removed." |
178 | | ;; |
179 | | *) |
180 | | echo %f" is not a news article." |
181 | | ;; |
182 | | esac |
| 324 | man "$MAN" |
221 | | = f \.tex$ & t r |
222 | | + f \.tex$ & t r & ! t t |
223 | | t Run latex on file and show it with xdvi |
224 | | latex %f && xdvi "`basename %f .tex`".dvi |
225 | | |
226 | | =+ f ^part | f ^Part | f uue & t r |
227 | | + t t |
228 | | U Uudecode marked news articles (needs work) |
229 | | ( |
230 | | for i in %t ; do # strip headers |
231 | | FIRST=`awk '{print $1 ; exit}' "$i"` |
232 | | cat "$i" | sed '/^'"$FIRST"' /,/^$/d' |
233 | | done |
234 | | ) | sed '/^$/d' | sed -n '/^begin 6/,/^end$/p' | uudecode |
235 | | if [ "$?" != "0" ]; then |
236 | | echo "Cannot decode "%t"." |
| 347 | + ! t t |
| 348 | t List compressed archive/image using 7z |
| 349 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 350 | case %f in |
| 351 | *.tar.*) |
| 352 | tar -taf %f;; |
| 353 | *) |
| 354 | ${P7ZIP} l %f;; |
| 355 | esac |
| 356 | |
| 357 | + t t |
| 358 | t List compressed archives/images using 7z |
| 359 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 360 | for i in %t ; do |
| 361 | case %f in |
| 362 | *.tar.*) |
| 363 | tar -taf "$i";; |
| 364 | *) |
| 365 | ${P7ZIP} l "$i";; |
| 366 | esac |
| 367 | done |
| 368 | |
| 369 | + ! t t |
| 370 | T Test compressed archive/image using 7z |
| 371 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 372 | case %f in |
| 373 | *.tar.*) |
| 374 | tar -taf %f;; |
| 375 | *) |
| 376 | ${P7ZIP} t -bb3 %f;; |
| 377 | esac |
| 378 | |
| 379 | + t t |
| 380 | T Test compressed archives/images using 7z |
| 381 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 382 | for i in %t ; do |
| 383 | case %f in |
| 384 | *.tar.*) |
| 385 | tar -taf "$i";; |
| 386 | *) |
| 387 | ${P7ZIP} t -bb3 "$i";; |
| 388 | esac |
| 389 | done |
| 390 | |
| 391 | + ! t t |
| 392 | e Extract compressed archive/image using 7z |
| 393 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 394 | ${P7ZIP} x -bb3 -o$(dirname %f) %f |
| 395 | |
| 396 | + t t |
| 397 | e Extract compressed archives/images using 7z |
| 398 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 399 | for i in %t ; do |
| 400 | ${P7ZIP} x -bb3 -o"$(dirname "$i")" "$i" |
| 401 | done |
| 402 | |
| 403 | + ! t t |
| 404 | E Extract compressed archive/image to subdirs using 7z |
| 405 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 406 | id=`basename %f` |
| 407 | iD="${id%.*}" |
| 408 | mkdir -p "$iD" |
| 409 | ${P7ZIP} x -bb3 -o"$iD" %f |
| 410 | |
| 411 | + t t |
| 412 | E Extract compressed archives/images to subdirs using 7z |
| 413 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 414 | for i in %t ; do |
| 415 | id=`basename "$i"` |
| 416 | iD="${id%.*}" |
| 417 | mkdir -p "$iD" |
| 418 | ${P7ZIP} x -bb3 -o"$iD" "$i" |
| 419 | done |
| 420 | |
| 421 | + f \.tar$ | f \.tar\.gz$ | f \.tar\.z$ | f \.tgz$ | f \.tpz$ | f \.tar\.lz$ | f \.tar\.lz4$ | f \.tar\.lzma$ | f \.tar\.lzo$ | f \.tar\.7z$ | f \.tar\.xz$ | f \.txz$ | f \.tar\.zst$ | f \.tzst$ | f \.tar\.Z$ | f \.tar\.bz2$ | f \.tbz2$ & t rl & ! t t |
| 422 | x Extract compressed tar archive |
| 423 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 424 | unset PRG |
| 425 | case %f in |
| 426 | *.tar) |
| 427 | PRG="";; |
| 428 | *.tar.7z) |
| 429 | PRG="${P7ZIP} e -so";; |
| 430 | *.tar.bz2|*.tbz2) |
| 431 | PRG="bunzip2 -c";; |
| 432 | *.tar.gz|*.tar.z|*.tgz|*.tpz|*.tar.Z) |
| 433 | PRG="gzip -dc";; |
| 434 | *.tar.lz) |
| 435 | PRG="lzip -dc";; |
| 436 | *.tar.lz4) |
| 437 | PRG="lz4 -dc";; |
| 438 | *.tar.lzma) |
| 439 | PRG="lzma -dc";; |
| 440 | *.tar.lzo) |
| 441 | PRG="lzop -dc";; |
| 442 | *.tar.xz|*.txz) |
| 443 | PRG="xz -dc";; |
| 444 | *.tar.zst|*.tzst) |
| 445 | PRG="zstd -dc";; |
| 446 | *) |
| 447 | exit 1;; |
| 448 | esac |
| 449 | if [ -n "$PRG" ]; then |
| 450 | $PRG %f | tar -xvf - |
| 451 | else |
| 452 | tar -xf %f |
244 | | *.tar.7z) PRG="7za e -so";; |
245 | | *.tar.bz2) PRG="bunzip2 -c";; |
246 | | *.tar.gz|*.tar.z|*.tgz|*.tpz|*.tar.Z) PRG="gzip -dc";; |
247 | | *.tar.lz) PRG="lzip -dc";; |
248 | | *.tar.lz4) PRG="lz4 -dc";; |
249 | | *.tar.lzma) PRG="lzma -dc";; |
250 | | *.tar.lzo) PRG="lzop -dc";; |
251 | | *.tar.xz) PRG="xz -dc";; |
252 | | *.tar.zst) PRG="zstd -dc";; |
253 | | *) exit 1;; |
| 498 | *.tar) |
| 499 | PRG=""; D=`basename %f .tar`;; |
| 500 | *.tar.7z) |
| 501 | PRG="${P7ZIP} e -so"; D=`basename %f .tar.7z`;; |
| 502 | *.tar.bz2) |
| 503 | PRG="bunzip2 -c"; D=`basename %f .tar.bz2`;; |
| 504 | *.tbz2) |
| 505 | PRG="bunzip2 -c"; D=`basename %f .tbz2`;; |
| 506 | *.tar.gz) |
| 507 | PRG="gzip -dc"; D=`basename %f .tar.gz`;; |
| 508 | *.tar.z) |
| 509 | PRG="gzip -dc"; D=`basename %f .tar.z`;; |
| 510 | *.tgz) |
| 511 | PRG="gzip -dc"; D=`basename %f .tgz`;; |
| 512 | *.tpz) |
| 513 | PRG="gzip -dc"; D=`basename %f .tpz`;; |
| 514 | *.tar.Z) |
| 515 | PRG="gzip -dc"; D=`basename %f .tar.Z`;; |
| 516 | *.tar.lz) |
| 517 | PRG="lzip -dc"; D=`basename %f .tar.lz`;; |
| 518 | *.tar.lz4) |
| 519 | PRG="lz4 -dc"; D=`basename %f .tar.lz4`;; |
| 520 | *.tar.lzma) |
| 521 | PRG="lzma -dc"; D=`basename %f .tar.lzma`;; |
| 522 | *.tar.lzo) |
| 523 | PRG="lzop -dc"; D=`basename %f .tar.lzo`;; |
| 524 | *.tar.xz) |
| 525 | PRG="xz -dc"; D=`basename %f .tar.xz`;; |
| 526 | *.txz) |
| 527 | PRG="xz -dc"; D=`basename %f .txz`;; |
| 528 | *.tar.zst) |
| 529 | PRG="zstd -dc"; D=`basename %f .tar.zst`;; |
| 530 | *.tzst) |
| 531 | PRG="zstd -dc"; D=`basename %f .tzst`;; |
| 532 | *.tar.F) |
| 533 | PRG="freeze -dc"; D=`basename %f .tar.F`;; |
| 534 | *) |
| 535 | echo "Unsupported compression,"; exit 255;; |
257 | | = t r |
258 | | + ! t t |
259 | | y Gzip or gunzip current file |
| 543 | + f \.tar$ | f \.tar\.gz$ | f \.tar\.z$ | f \.tgz$ | f \.tpz$ | f \.tar\.lz$ | f \.tar\.lz4$ | f \.tar\.lzma$ | f \.tar\.lzo$ | f \.tar\.7z$ | f \.tar\.xz$ | f \.txz$ | f \.tar\.zst$ | f \.tzst$ | f \.tar\.Z$ | f \.tar\.bz2$ | f \.tbz2$ & t t |
| 544 | X Extract tagged compressed tar archives to subdirectories |
| 545 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 546 | for i in %t ; do |
| 547 | unset D |
| 548 | unset PRG |
| 549 | case "$i" in |
| 550 | *.tar) |
| 551 | PRG=""; D=`basename $i .tar`;; |
| 552 | *.tar.7z) |
| 553 | PRG="${P7ZIP} e -so"; D=`basename $i .tar.7z`;; |
| 554 | *.tar.bz2) |
| 555 | PRG="bunzip2 -c"; D=`basename $i .tar.bz2`;; |
| 556 | *.tbz2) |
| 557 | PRG="bunzip2 -c"; D=`basename $i .tbz2`;; |
| 558 | *.tar.gz) |
| 559 | PRG="gzip -dc"; D=`basename $i .tar.gz`;; |
| 560 | *.tar.z) |
| 561 | PRG="gzip -dc"; D=`basename $i .tar.z`;; |
| 562 | *.tgz) |
| 563 | PRG="gzip -dc"; D=`basename $i .tgz`;; |
| 564 | *.tpz) |
| 565 | PRG="gzip -dc"; D=`basename $i .tpz`;; |
| 566 | *.tar.Z) |
| 567 | PRG="gzip -dc"; D=`basename $i .tar.Z`;; |
| 568 | *.tar.lz) |
| 569 | PRG="lzip -dc"; D=`basename $i .tar.lz`;; |
| 570 | *.tar.lz4) |
| 571 | PRG="lz4 -dc"; D=`basename $i .tar.lz4`;; |
| 572 | *.tar.lzma) |
| 573 | PRG="lzma -dc"; D=`basename $i .tar.lzma`;; |
| 574 | *.tar.lzo) |
| 575 | PRG="lzop -dc"; D=`basename $i .tar.lzo`;; |
| 576 | *.tar.xz) |
| 577 | PRG="xz -dc"; D=`basename $i .tar.xz`;; |
| 578 | *.txz) |
| 579 | PRG="xz -dc"; D=`basename $i .txz`;; |
| 580 | *.tar.zst) |
| 581 | PRG="zstd -dc"; D=`basename $i .tar.zst`;; |
| 582 | *.tzst) |
| 583 | PRG="zstd -dc"; D=`basename $i .tzst`;; |
| 584 | *.tar.F) |
| 585 | PRG="freeze -dc"; D=`basename $i .tar.F`;; |
| 586 | *) |
| 587 | echo "Unsupported compression,"; exit 255;; |
| 588 | esac |
| 589 | if [ -n "$PRG" ]; then |
| 590 | mkdir "$D" && $PRG $i | tar -C "$D" -xvf - |
| 591 | else |
| 592 | mkdir "$D" && tar -C "$D" -xvf "$i" |
| 593 | fi |
| 594 | done |
| 595 | |
| 596 | + t r & ! t t |
| 597 | z Compress / UnCompress (gzip) current file |
313 | | set gzip -dc |
314 | | unset D |
| 666 | unset DECOMP |
| 667 | unset DEPROG |
| 668 | case "$i" in |
| 669 | *.zst) |
| 670 | DEPROG=zstd; DECOMP="-d --rm";; |
| 671 | *) |
| 672 | DEPROG=zstd; DECOMP="--rm";; |
| 673 | esac |
| 674 | $DEPROG $DECOMP -v "$i" |
| 675 | done |
| 676 | |
| 677 | + t r & ! t t |
| 678 | u Compress / UnCompress (xz) current file |
| 679 | unset DECOMP |
| 680 | unset DEPROG |
| 681 | case %f in |
| 682 | *.xz) |
| 683 | DEPROG=xz; DECOMP=-d;; |
| 684 | *) |
| 685 | DEPROG=xz; DECOMP="";; |
| 686 | esac |
| 687 | # Do *not* add quotes around $DECOMP! |
| 688 | $DEPROG $DECOMP -v %f |
| 689 | |
| 690 | + t t |
| 691 | u Compress / UnCompress (xz) tagged files |
| 692 | for i in %t ; do |
| 693 | unset DECOMP |
| 694 | unset DEPROG |
| 695 | case "$i" in |
| 696 | *.xz) |
| 697 | DEPROG=xz; DECOMP=-d;; |
| 698 | *) |
| 699 | DEPROG=xz; DECOMP="";; |
| 700 | esac |
| 701 | $DEPROG $DECOMP -v "$i" |
| 702 | done |
| 703 | |
| 704 | + t r & ! t t |
| 705 | U Compress (xz using 7z) / UnCompress (any) current file |
| 706 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 707 | case %f in |
| 708 | *.gz|*.[zZ]|*.bz2|*.xz|*.xz|*.7z|*.zst) |
| 709 | ${P7ZIP} x %f && rm -vf %f;; |
| 710 | *) |
| 711 | ${P7ZIP} a -txz -m0=lzma2 -ms=on $COMPRESS_OPTS_7Z %f.xz %f && test -r %f.xz && rm -vf %f;; |
| 712 | esac |
| 713 | |
| 714 | + t t |
| 715 | U Compres (xz using 7z) / UnCompress (any) tagged files |
| 716 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 717 | for i in %t ; do |
| 718 | unset DECOMP |
377 | | + x /usr/bin/open | x /usr/local/bin/open & x /bin/sh |
378 | | o Open next a free console |
379 | | open -s -- sh |
| 793 | + ! t t |
| 794 | j Convert any->xz (using 7z) |
| 795 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 796 | i=%f |
| 797 | case "$i" in |
| 798 | *.Z|*.bz2|*.gz|*.z|*.Z|*.bz2|*.tar.rar|*.tar.7z|*.zst) |
| 799 | EXT=xz;; |
| 800 | *.tgz|*.tbz2|*.tzst|*.tpz) |
| 801 | EXT=tar.xz;; |
| 802 | *) |
| 803 | echo "Unsupported compression."; exit 255;; |
| 804 | esac |
| 805 | ${P7ZIP} e -so "$i" | ${P7ZIP} a -si -txz -m0=lzma2 -ms=on $COMPRESS_OPTS_7Z "${i%.*}.$EXT" && [ -s "${i%.*}.$EXT" ] && rm -vf "${i}" |
| 806 | |
| 807 | + t t |
| 808 | j Convert any->xz (using 7z) |
| 809 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 810 | for i in %t ; do |
| 811 | case "$i" in |
| 812 | *.Z|*.bz2|*.gz|*.z|*.Z|*.bz2|*.tar.rar|*.tar.7z|*.zst) |
| 813 | EXT=xz;; |
| 814 | *.tgz|*.tbz2|*.tzst|*.tpz|*.txz) |
| 815 | EXT=tar.xz;; |
| 816 | *) |
| 817 | echo "Unsupported compression."; exit 255;; |
| 818 | esac |
| 819 | ${P7ZIP} e -so "$i" | ${P7ZIP} a -si -txz -m0=lzma2 -ms=on $COMPRESS_OPTS_7Z "${i%.*}.$EXT" && [ -s "${i%.*}.$EXT" ] && rm -vf "${i}" |
| 820 | done |
| 821 | |
| 822 | + ! t t |
| 823 | J Convert any->zst (using 7z+zstd) |
| 824 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 825 | i=%f |
| 826 | case "$i" in |
| 827 | *.Z|*.bz2|*.gz|*.z|*.Z|*.bz2|*.tar.rar|*.tar.7z|*.xz) |
| 828 | EXT=zst;; |
| 829 | *.tgz|*.tbz2|*.tzst|*.tpz|*.txz) |
| 830 | EXT=tar.zst;; |
| 831 | *) |
| 832 | echo "Unsupported compression."; exit 255;; |
| 833 | esac |
| 834 | ${P7ZIP} e -so "$i" | zstd $COMPRESS_OPTS_ZSTD - -o "${i%.*}.$EXT" && [ -s "${i%.*}.$EXT" ] && rm -vf "${i}" |
| 835 | |
| 836 | + t t |
| 837 | J Convert any->zst (Using 7z+zstd) |
| 838 | P7ZIP=`which 7zz 2>/dev/null` || P7ZIP=`which 7z 2>/dev/null` || P7ZIP=`which 7za 2>/dev/null` |
| 839 | for i in %t ; do |
| 840 | case "$i" in |
| 841 | *.Z|*.bz2|*.gz|*.z|*.Z|*.bz2|*.tar.rar|*.tar.7z|*.xz) |
| 842 | EXT=zst;; |
| 843 | *.tgz|*.tbz2|*.tzst|*.tpz|*.txz) |
| 844 | EXT=tar.zst;; |
| 845 | *) |
| 846 | echo "Unsupported compression."; exit 255;; |
| 847 | esac |
| 848 | ${P7ZIP} e -so "$i" | zstd $COMPRESS_OPTS_ZSTD - -o "${i%.*}.$EXT" && [ -s "${i%.*}.$EXT" ] && rm -vf "${i}" |
| 849 | done |
| 850 | |
| 851 | + t t |
| 852 | i Compare (mcdiff) tagged files/directories |
| 853 | mcdiff %t |
| 854 | |
| 855 | + ! t t |
| 856 | i Compare (mcdiff) opposite selected files |
| 857 | if [ %d/%f = %D/%F ]; then |
| 858 | echo "The two files must be different" |
| 859 | exit 1 |
| 860 | fi |
| 861 | mcdiff %d/%f %D/%F |
| 862 | |
| 863 | + ! t t |
| 864 | s Calculate SHA256 checksum of the current file |
| 865 | if which -s shasum; then SHACMD="shasum -a256"; else SHACMD="sha256sum"; fi |
| 866 | $SHACMD %f |
| 867 | |
| 868 | + t t |
| 869 | s Calculate SHA256 checksum of on the tagged files |
| 870 | for i in %t ; do |
| 871 | if which -s shasum; then SHACMD="shasum -a256"; else SHACMD="sha256sum"; fi |
| 872 | $SHACMD "$i" |
| 873 | done |
| 874 | |
| 875 | + ! t t |
| 876 | S Calculate SHA512 checksum of the current file |
| 877 | if which -s shasum; then SHACMD="shasum -a512"; else SHACMD="sha512sum"; fi |
| 878 | $SHACMD %f |
| 879 | |
| 880 | + t t |
| 881 | S Calculate SHA512 checksum of on the tagged files |
| 882 | for i in %t ; do |
| 883 | if which -s shasum; then SHACMD="shasum -a512"; else SHACMD="sha512sum"; fi |
| 884 | $SHACMD "$i" |
| 885 | done |
| 886 | |
| 887 | + ! t t |
| 888 | f Check file type |
| 889 | file %f |
| 890 | |
| 891 | +t t |
| 892 | f Check files type |
| 893 | for i in %t ; do |
| 894 | file "$i" |
| 895 | done |
| 896 | |
| 897 | + ! t t |
| 898 | F Rename objects in current direcroty using vidir |
| 899 | cd %d |
| 900 | VISUAL=mcedit vidir |
| 901 | |
| 902 | + t t |
| 903 | F Rename tagged file/directories using vidir |
| 904 | cd %d |
| 905 | VISUAL=mcedit vidir %t |
| 906 | |
| 907 | h Fetch git remote changes |
| 908 | echo -n "Choose remote to fetch (empty for all) [$(git remote | tr '\n' ' ')]:" |
| 909 | read REMOTE |
| 910 | [ "$remote"x = x ] && remote="--all" |
| 911 | git fetch $REMOTE |
| 912 | |
| 913 | H Fetch git remote changes (verbose) |
| 914 | echo "Available remotes:" |
| 915 | git remote |
| 916 | echo -n "Name of remote to fetch (empty for all): " |
| 917 | read REMOTE |
| 918 | [ "$remote"x = x ] && remote="--all" |
| 919 | GIT_TRACE=2 git fetch --verbose $REMOTE |
| 920 | |
| 921 | g Show git log |
| 922 | git log --graph --abbrev-commit --date=relative --pretty=format:'%%Cred%%h%%Creset %%C(yellow)[%%an]%%Creset -%%C(cyan)%%d%%Creset %%s - %%Cgreen%%ch %%Cblue(%%cr)%%Creset' |
| 923 | |
| 924 | G Show git log (include remotes) |
| 925 | git log --graph --abbrev-commit --date=relative --all --pretty=format:'%%Cred%h%Creset %%C(yellow)[%%an]%%Creset -%%C(cyan)%%d%%Creset %%s - %%Cgreen%%ch %%Cblue(%%cr)%%Creset' |
| 926 | |
| 927 | n Run NCurses Disk Usage (ncdu -x) |
| 928 | ncdu -x |
| 929 | |
| 930 | + f \.ncdu$ & t r & ! t t |
| 931 | N View NCurses Disk Usage file (ncdu) |
| 932 | ncdu -f %f |
| 933 | |
| 934 | + ! t t |
| 935 | N Create current directoy index file (ncdu) |
| 936 | i="../$(basename `pwd`).ncdu" |
| 937 | ncdu -o "$i" |
| 938 | |
| 939 | q Tail log file |
| 940 | tail -f %f |
| 941 | |
| 942 | Q Tail (follow) log file |
| 943 | tail -F %f |