git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Brockman <gdb@MIT.EDU>
To: j.sixt@viscovery.net, git@vger.kernel.org, gitster@pobox.com,
	avarab@gmail.com, jrnieder@gmail.com
Cc: Greg Brockman <gdb@mit.edu>
Subject: [PATCH 3/4] git-shell-commands: Add a help command
Date: Tue, 20 Jul 2010 01:16:11 -0400	[thread overview]
Message-ID: <1279602972-1264-4-git-send-email-gdb@mit.edu> (raw)
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

  parent reply	other threads:[~2010-07-20  5:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20  5:16 Updated patch series for providing mechanism to list available repositories Greg Brockman
2010-07-20  5:16 ` [PATCH 1/4] Allow creation of arbitrary git-shell commands Greg Brockman
2010-07-20 17:01   ` Junio C Hamano
2010-07-21 15:11     ` Greg Brockman
2010-07-20  5:16 ` [PATCH 2/4] git-shell-commands: Add a command to list bare repos Greg Brockman
2010-07-20 17:42   ` Junio C Hamano
2010-07-26 23:28     ` Greg Brockman
2010-07-20  5:16 ` Greg Brockman [this message]
2010-07-20  5:16 ` [PATCH 4/4] Add interactive mode to git-shell for user-friendliness Greg Brockman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1279602972-1264-4-git-send-email-gdb@mit.edu \
    --to=gdb@mit.edu \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    --cc=jrnieder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).