From e48ad81ecc2af64a03b8bd427ffff8d065723a8c Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Fri, 11 May 2012 21:18:43 +0200 Subject: [PATCH] FIX: Built-in action help for OS X. POSIX sed doesn't support regex branches; I don't want to switch to modern regexp (via -E), since that makes more characters special. Rather, expand the alternatives into two sed commands. --- todo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/todo.sh b/todo.sh index 2a77dc5..766672a 100755 --- a/todo.sh +++ b/todo.sh @@ -314,7 +314,7 @@ actionUsage() if [ -f "$action" -a -x "$action" ]; then "$action" usage else - builtinActionUsage=$(actionsHelp | sed -ne "/^ ${actionName//\//\\/}\\( \\|\$\\)/,/^\$/p") + builtinActionUsage=$(actionsHelp | sed -n -e "/^ ${actionName//\//\\/} /,/^\$/p" -e "/^ ${actionName//\//\\/}$/,/^\$/p") if [ "$builtinActionUsage" ]; then echo "$builtinActionUsage" echo