From e3f6b8e3246f89c6df4052006d18df542721c16e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 2 Jun 2014 13:48:51 -0400 Subject: lukeshu-ify the git-shell-commands mostly, handle escaping repo names consistently-ish --- git-shell-commands/help | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'git-shell-commands/help') 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 -- cgit v1.2.3