1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-09 15:19:02 -08:00

convert compatibility lines to new format

This commit is contained in:
Connor Olding 2024-07-22 05:28:58 -07:00
parent 74b2e5ef0a
commit 3a1ab5d5bc
89 changed files with 89 additions and 89 deletions

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
argc() { ### @- validate the number of arguments in a function.
### ```sh

View file

@ -1,5 +1,5 @@
#!/usr/bin/env zsh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
# though technically compatible with other shells,
# extra functionality is through zsh's extended arithmetic functions.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env false
# YES_ZSH YES_BASH NO_DASH NO_ASH
# compat: -ash +bash -dash +zsh
whoa=(
-Wall

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
askey() {
printf '\033[100m 00 \033[m \033[100m 01 \033[m \033[100m 02 \033[m \033[100m 03 \033[m \033[100m 04 \033[m \033[100m 05 \033[m \033[100m 06 \033[m \033[100m 07 \033[m \033[100m 08 \033[m \033[100m 09 \033[m \033[100m 0A \033[m \033[100m 0B \033[m \033[100m 0C \033[m \033[100m 0D \033[m \033[100m 0E \033[m \033[100m 0F \033[m

View file

@ -1,5 +1,5 @@
#!/usr/bin/env zsh
# YES_ZSH NO_BASH NO_DASH NO_ASH
# compat: -ash -bash -dash +zsh
# TODO: portable way of dodging aliases to allow other shell support?

2
sh/bak
View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
bak() { ### @-
### backup files by creating copies and appending ".bak" to their names.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
baknow() { ### @- backup files by appending their timestamps given by [`now`.](#now)
### ```

View file

@ -1,6 +1,6 @@
#!/usr/bin/env sh
# backup, timestamped
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
baks() { ### @-
### backup files by copying each and appending *the current* date-time,

2
sh/bin
View file

@ -1,5 +1,5 @@
#!/usr/bin/env zsh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
# though technically compatible with other shells,
# extra functionality is through zsh's extended arithmetic functions.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
burl() ( ### @-
### turn bash into a makeshift HTTP client.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env zsh
# YES_ZSH NO_BASH NO_DASH NO_ASH
# compat: -ash -bash -dash +zsh
busiest() { ### @-
### list directories in descending order by the number of files in them,

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
clash() { ### @- run a command through 12 different shells.
### only returns false when no arguments are given.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# YES_ZSH YES_BASH NO_DASH NO_ASH
# compat: -ash +bash -dash +zsh
colors() { ### @-
### display all combinations of foreground and background terminal colors.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
colors2() {
[ $# -eq 0 ] || { printf "%s\n" "$0: does not take arguments" >&2; return 1; }

View file

@ -1,5 +1,5 @@
#!/usr/bin/env zsh
# YES_ZSH NO_BASH NO_DASH NO_ASH
# compat: -ash -bash -dash +zsh
setup_clang_ubuntu() { ### @-
### print (but don't execute) the commands necessary to install

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
### @ confirm
### display a simple yes-or-no prompt and return 0-or-1 respectively.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH YES_BB_AWK YES_OT_AWK
# compat: +ash +bash +dash +zsh YES_BB_AWK YES_OT_AWK
countdiff() { ### @-
### count the number of lines changed between two files.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env zsh
# YES_ZSH NO_BASH NO_DASH NO_ASH
# compat: -ash -bash -dash +zsh
cutv() {
argc $# -ge 2 "$0" || return

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
dated() {
local ts= u=0

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
days() { ### @-
### compute the number of days since a given date.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
# TODO: check if this is compatible with busybox.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
dedupe() ( ### @- copy a directory, but make hard/softlinks for identical files.
# Copyright (C) 2022 Connor Olding

2
sh/dfu
View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH YES_BB_AWK YES_OT_AWK
# compat: +ash +bash +dash +zsh YES_BB_AWK YES_OT_AWK
dfu() { ### @-
### pretty-print `df` in GiB.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
disowned() { ### @- find files in system directories that aren't associated with any pacman packages.
#

2
sh/e
View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH YES_BB_AWK
# compat: +ash +bash +dash +zsh YES_BB_AWK
e() { ### @-
### wrap around `$EDITOR` to run it as root if necessary.

2
sh/ea
View file

@ -1,6 +1,6 @@
#!/usr/bin/env sh
# remote file access (http file-sharing shenanigans)
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
__ea_curl() {
curl -q --no-progress-meter 127.255.255.255 >/dev/null 2>&1

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
echo2() { ### @-
### print arguments joined by spaces to stderr without parsing anything.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
explore() { ### @- open a single directory in `explorer.exe`, defaulting to `$PWD`.
[ -n "$MSYSTEM" ] || { printf "%s\n" "$0: only for MSYS2" >&2; return 1; }

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
### @feud - parse command-line arguments, mapping short-flags to variable names.
### **NOTE:** the API is still experimental and will undergo major changes.

2
sh/ff
View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
ff() { ### @-
### select a file from a given or current directory using

View file

@ -2,7 +2,7 @@
# ghmd - format GitHub markdown
# via: https://leahneukirchen.org/dotfiles/.zshrc
# example: ghmd < README.md > README.html
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
ghmd() { ### @-
### convert a markdown file to HTML in the style of GitHub.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env dash
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
# fuck termcap, all my homies hate termcap.
glug() ( # note the subshell syntax. this allows us to abuse globals like crazy.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
__grab() { ### @grab - download a file from my site and verify its integrity by its [minisign](https://github.com/jedisct1/minisign/) signature.
[ -z "${ZSH_VERSION}" ] || emulate sh

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
# TODO: check for existence of grep -P; write a perl-based fallback.
grop() { ### @- invoke grep with `-oP`.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
grop4() { ### @- [`grop`](#grop) for IPv4s.
grep -oP -- '(?<=^|[^\d.])((0|1\d\d|2[0-4]\d|25[0-5]|[1-9]\d?)\.((?2))\.((?2))\.((?2)))(?=$|[^\d.])'

2
sh/has
View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
has() { ### @- [`have`,](#have) silently.
if [ -z "$ZSH_VERSION" ]; then which -- "$1"; else whence -p -- "$1"; fi

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
have() { ### @- print the result of `which` if the program is found, else simply return 1.
### ```

2
sh/hex
View file

@ -1,5 +1,5 @@
#!/usr/bin/env zsh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
# though technically compatible with other shells,
# extra functionality is through zsh's extended arithmetic functions.

2
sh/ify
View file

@ -1,5 +1,5 @@
#!/usr/bin/sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
ify() { ### @-
### pipe one command through another, so you can still pass arguments to the former.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# YES_ZSH YES_BASH NO_DASH NO_ASH
# compat: -ash +bash -dash +zsh
is_empty() { ### @-
### return 0 if the directory given by argument is empty.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
isup() { ### @-
### return 0 if a given website returns a 2xx HTTP code.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
join2() { ### @- join every other line.
# TODO: argc, also better interface that allows n file inputs without stdin.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env zsh
# YES_ZSH NO_BASH NO_DASH NO_ASH
# compat: -ash -bash -dash +zsh
lsarchive() { ### @- list the contents of an archive file in one of many formats.
### borrowed from [prezto.](https://github.com/sorin-ionescu/prezto)

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
__maybesudo() { ### @maybesudo
### mimic certain features of `sudo` for systems without it installed.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env dash
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
minutemaid() { ### @-
### check if the current minute is divisible by a given number,

View file

@ -1,5 +1,5 @@
#!/usr/bin/env zsh
# YES_ZSH NO_BASH NO_DASH NO_ASH
# compat: -ash -bash -dash +zsh
monitor() { ### @-
### this is [watch(1)](https://www.man7.org/linux/man-pages/man1/watch.1.html)

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# YES_ZSH YES_BASH NO_DASH NO_ASH
# compat: -ash +bash -dash +zsh
morecolors() { ### @- print all 256 colors that are available on most terminals.
# borrowed from leah2's dotfiles.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
# TODO: what's the minimum version of perl required for this?

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
note() { ### @-
### act like [`echo2`,](#echo2) but use a bright color to stand out more.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
__notice_warn() {
printf >&2 'notice: %s\n' "$*"

2
sh/now
View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
now() { ### @-
### print a date-time (UTC) in a sortable format.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
__oshi() { ### @oshi
### upload files (or stdin) to [oshi.at.](https://oshi.at)

2
sh/oxo
View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
# **TL;DR RULES:**
# * no executables (for the most part)

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
# TODO: does this work with busybox awk?

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
### @ pause
### pause — the companion script of [`confirm`.](#confirm)

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
pegg() { ### @-
### download and (pip) install a Python "egg" from a project on GitHub,

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
__permit_hex() {
if xxd -l 0 2>/dev/null; then

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
pippy() { ### @-
### install Python packages using pip,

2
sh/pre
View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
pre() { ### @-
### dump all the `#define`s that `$CC $CPPFLAGS $CFLAGS $LDFLAGS` would result in.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH YES_BB_AWK
# compat: +ash +bash +dash +zsh YES_BB_AWK
psbm() { ### @-
### display and order processes by their memory usage ascending, and their sum.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
# works with busybox.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
__recolor_install() {
ForegroundColour() { recolor RAW 10 "$@"; }

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
# works with busybox tr.

2
sh/rs
View file

@ -1,5 +1,5 @@
#!/usr/bin/env zsh
# YES_ZSH NO_BASH NO_DASH NO_ASH
# compat: -ash -bash -dash +zsh
rs() { ### @-
### record screen. does not record audio.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH YES_BB_AWK
# compat: +ash +bash +dash +zsh YES_BB_AWK
# probably not compatible with busybox ps because its column 2 isn't PID.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
### @ scount
### perform `sort | uniq -c | sort -n`, preferring GNU awk when available.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
# does not work with busybox sed (yet?)

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
scropt() { ### @-
### run `scrot` through `optipng` and save the result to `~/play/$(now).png`.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
shcom() { ### @-
### comment out text from stdin and wrap it in a markdown blockquote

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH YES_BB_AWK
# compat: +ash +bash +dash +zsh YES_BB_AWK
similar() { ### @-
### highlight adjacent lines up to the first inequivalent character.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env dash
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
# works with busybox ash.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env dash
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
# works with busybox ash.

View file

@ -1,5 +1,5 @@
#!/usr/bin/sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
sortip() { ### @- sort lines numerically by IPv4 segments.
sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n "$@"

View file

@ -1,5 +1,5 @@
#!/usr/bin/env zsh
# YES_ZSH YES_BASH NO_DASH NO_ASH
# compat: -ash +bash -dash +zsh
sram() { ### @-
### convert between a couple saveram formats for N64 emulators.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
stfu() { ### @-
### invoke a command, silencing stdout and stderr *unless* the command fails.

View file

@ -1,6 +1,6 @@
#!/usr/bin/env false
# awful things
# YES_ZSH YES_BASH NO_DASH NO_ASH
# compat: -ash +bash -dash +zsh
mpvs() {
mpv --quiet \

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
__subdue() { ### @subdue
### reconfigure your terminal's color scheme using a preset for [recolor.](#recolor)

2
sh/sum
View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
sum() { ### @-
### compute the summation of its arguments without forking processes.

2
sh/sv
View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH YES_BB_AWK
# compat: +ash +bash +dash +zsh YES_BB_AWK
sv() { ### @-
### collect the lastmost value of every key.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
trash() { ### @-
### output a given number of bytes from `/dev/random`.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH YES_BB_AWK
# compat: +ash +bash +dash +zsh YES_BB_AWK
trunc() { ### @-
### truncate text to fit within your terminal using the unicode character `…`.

View file

@ -1,5 +1,5 @@
#!/usr/bin/env zsh
# YES_ZSH NO_BASH NO_DASH NO_ASH
# compat: -ash -bash -dash +zsh
unarchive() { ### @- extract the contents of an archive file in one of many formats.
### borrowed from [prezto.](https://github.com/sorin-ionescu/prezto)

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
unwrap() { ### @- join paragraphs into one line each.
awk '\''BEGIN{RS="\n\n";FS="\n"}{for(i=1;i<=NF;i++)printf "%s ",$i;print "\n"}'\'

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
v_domap() {
argc $# -eq 1 "$0" || return

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
v_lower() { ### @- transform the contents of a variable to lowercase.
argc $# -eq 1 "$0" || return

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
v_upper() { ### @- transform the contents of a variable to uppercase.
argc $# -eq 1 "$0" || return

2
sh/wat
View file

@ -1,5 +1,5 @@
#!/usr/bin/env zsh
# YES_ZSH NO_BASH NO_DASH NO_ASH
# compat: -ash -bash -dash +zsh
# wat - a better and recursive which/whence
# via: https://leahneukirchen.org/dotfiles/tools.html

View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH YES_BB_AWK
# compat: +ash +bash +dash +zsh YES_BB_AWK
wipe() { ### @-
### clear the screen and its scrollback, then print a high-contrast horizontal line.

2
sh/xxp
View file

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
# compat: +ash +bash +dash +zsh
xxp() { ### @-
### act like `xxd -p`, but nicely formatted.