summaryrefslogtreecommitdiff
path: root/git-shell-commands/help
diff options
context:
space:
mode:
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