summaryrefslogtreecommitdiff
path: root/git-shell-commands/help
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-06-02 13:48:51 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-06-02 13:48:51 -0400
commite3f6b8e3246f89c6df4052006d18df542721c16e (patch)
tree481143d61ead547b2e76ac66bc07cc533f2f7f6e /git-shell-commands/help
parent296184cb6a3f34b2e1f0ced37e862f1fcae7cc0c (diff)
lukeshu-ify the git-shell-commands
mostly, handle escaping repo names consistently-ish
Diffstat (limited to 'git-shell-commands/help')
-rwxr-xr-xgit-shell-commands/help6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-shell-commands/help b/git-shell-commands/help
index e707df8..f1d116b 100755
--- a/git-shell-commands/help
+++ b/git-shell-commands/help
@@ -5,8 +5,8 @@
set -e
-# Gets three lines from every git-shell-command
-for c in `dirname $0`/*; do
- head -q -n4 $c | tail -n3 | sed "s/^..//"
+# Gets the initial comment after the shebeng from every git-shell-command
+for c in "$(dirname "$0")"/*; do
+ sed -rn '2,/^[^#]/s/^# ?//p' "$c"
echo
done