git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/4] git-shell-commands: Add a help command

From
Greg Brockman <gdb@mit.edu>
Date
Jul 20, 2010, 05:16 UTC
Message-ID
<1279602972-1264-4-git-send-email-gdb@mit.edu>
In-Reply-To
<1279602972-1264-1-git-send-email-gdb@mit.edu>
Signed-off-by: Greg Brockman <gdb@mit.edu>
---
 contrib/git-shell-commands/help |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
 create mode 100755 contrib/git-shell-commands/help
diff --git a/contrib/git-shell-commands/help b/contrib/git-shell-commands/help
new file mode 100755
index 0000000..19d5277
--- /dev/null
+++ b/contrib/git-shell-commands/help
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -eu
+
+if tty -s; then
+    echo "Run 'help' for help, or 'exit' to leave.  Available commands:"
+else
+    echo "Run 'help' for help.  Available commands:"
+fi
+
+cd "$(dirname "$0")"
+
+for cmd in *; do
+    case "$cmd" in
+	help) ;;
+	*) [ -f "$cmd" ] && [ -x "$cmd" ] && echo "$cmd" ;;
+    esac
+done
-- 
1.7.0.4
Previous: Greg BrockmanNext: Greg Brockman
Message 8 of 9 in “Updated patch series for providing mechanism to list available repositories”
  1. Greg BrockmanJul 20, 2010
  2. 1/4 Allow creation of arbitrary git-shell commandsGreg Brockman, Jul 20, 2010
  3. Junio C HamanoJul 20, 2010
  4. Greg BrockmanJul 21, 2010
  5. 2/4 git-shell-commands: Add a command to list bare reposGreg Brockman, Jul 20, 2010
  6. Junio C HamanoJul 20, 2010
  7. Greg BrockmanJul 26, 2010
  8. 3/4 git-shell-commands: Add a help commandGreg Brockman, Jul 20, 2010
  9. 4/4 Add interactive mode to git-shell for user-friendlinessGreg Brockman, Jul 20, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.