From 0aee09f27445f1c8ccd2dbbd7987b5c8b5018467 Mon Sep 17 00:00:00 2001 From: Natalie Date: Sun, 17 May 2026 04:14:16 -0700 Subject: [PATCH] =?UTF-8?q?feat(@scripts):=20=E2=9C=A8=20add=20rbtop=20and?= =?UTF-8?q?=20help=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- bin/rbtop | 3 +++ bin/rclaude | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100755 bin/rbtop diff --git a/bin/rbtop b/bin/rbtop new file mode 100755 index 0000000..2efe832 --- /dev/null +++ b/bin/rbtop @@ -0,0 +1,3 @@ +#!/bin/bash +# rbtop - Connect to apricot and run btop (transient install) +ssh -t apricot.lan "dnf install -y btop && btop" diff --git a/bin/rclaude b/bin/rclaude index f4d107d..a508f00 100755 --- a/bin/rclaude +++ b/bin/rclaude @@ -344,10 +344,22 @@ cmd_version() { fi } +cmd_help() { + # Extract the leading comment block (everything from line 2 up to the + # first blank line after `# Usage:`), strip leading "# " / "#", and print. + _self=$(resolve_self) + awk ' + NR==1 { next } # skip shebang + /^[^#]/ { exit } # stop at first non-comment line + { sub(/^# ?/, ""); print } + ' "$_self" +} + case ${1:-} in - list) shift; cmd_list "$@"; exit ;; - resume) shift; cmd_resume "$@"; exit ;; - -v|--version) cmd_version; exit ;; + list) shift; cmd_list "$@"; exit ;; + resume) shift; cmd_resume "$@"; exit ;; + -v|--version) cmd_version; exit ;; + -h|--help|help) cmd_help; exit ;; esac # ---------------------------------------------------------------------------