feat(@scripts): ✨ add rbtop and help command
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
f79954e7fc
commit
0aee09f274
2 changed files with 18 additions and 3 deletions
3
bin/rbtop
Executable file
3
bin/rbtop
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
# rbtop - Connect to apricot and run btop (transient install)
|
||||
ssh -t apricot.lan "dnf install -y btop && btop"
|
||||
18
bin/rclaude
18
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
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue