diff options
| author | 2026-05-18 01:25:46 -0600 | |
|---|---|---|
| committer | 2026-05-18 01:25:46 -0600 | |
| commit | dc54a69b7552d8d44adf25b8009992c4a2b395be (patch) | |
| tree | 0c1864e9239bf02fc83408be378d983070250ead /help | |
init
Diffstat (limited to 'help')
| -rwxr-xr-x | help | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +#!/bin/sh +# Send help. I'm trapped in the machine. + +if [ $# -eq 0 ]; then + echo "Commands available:" + find -L "$(dirname "$0")" -maxdepth 1 -type f \! -name '.*' -execdir perl -e '$w=80;$buf=""; for (@ARGV) { s@^\./@@; if (length("$buf $_") > $w) { print("$buf\n"); $buf = ""; } $buf .= " $_"; } print("$buf\n");' {} + + echo + echo "This is https://cgit.space/~cgitspace/git-shell-commands.git@$(git describe --abbrev --dirty)" +else + if [[ $1 == *.* ]]; then + echo "No ." >&2 + exit 1 + fi + if [[ $1 == */* ]]; then + echo "No ." >&2 + exit 1 + fi + + sed '/^#!/d;/^\([^#]\|$\)/Q;s/^# \?//' "$(dirname "$0")/$1" +fi |
