From b2d18b25aa4a0d5dfa18c3b69f99cba58a656e68 Mon Sep 17 00:00:00 2001 From: steering7253 Date: Mon, 18 May 2026 01:51:49 -0600 Subject: add version and set term title --- help | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/help b/help index 47b7e14..13dc75e 100755 --- a/help +++ b/help @@ -1,11 +1,18 @@ #!/bin/sh # Send help. I'm trapped in the machine. +echo -e "\e]0;$USER@$HOSTNAME\e\\" + +cd "$(dirname "$0")" 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");' {} + + find -L . -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)" + status="" + git diff --no-ext-diff --quiet || status="${status}*" + git diff --no-ext-diff --cached --quiet || status="${status}+" + git ls-files --others --exclude-standard --directory --no-empty-directory --error-unmatch -- ':/*' >/dev/null 2>/dev/null && status="${status}%" + echo -e "This is \e]8;;https://cgit.space/~cgitspace/git-shell-commands/.git/tree/?id=$(git rev-parse HEAD)\e\\https://cgit.space/~cgitspace/git-shell-commands.git\e]8;;\e\\@$(git describe --long --always)$status" else if [[ $1 == *.* ]]; then echo "No ." >&2 -- cgit v1.3.1-10-gc9f91