Skip to content

Commit

Permalink
FIX: Built-in action help for OS X.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
inkarkat committed May 11, 2012
1 parent c0c93c8 commit e48ad81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion todo.sh
Expand Up @@ -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
Expand Down

0 comments on commit e48ad81

Please sign in to comment.