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.
This commit is contained in:
2
todo.sh
2
todo.sh
@@ -314,7 +314,7 @@ actionUsage()
|
|||||||
if [ -f "$action" -a -x "$action" ]; then
|
if [ -f "$action" -a -x "$action" ]; then
|
||||||
"$action" usage
|
"$action" usage
|
||||||
else
|
else
|
||||||
builtinActionUsage=$(actionsHelp | sed -ne "/^ ${actionName//\//\\/}\\( \\|\$\\)/,/^\$/p")
|
builtinActionUsage=$(actionsHelp | sed -n -e "/^ ${actionName//\//\\/} /,/^\$/p" -e "/^ ${actionName//\//\\/}$/,/^\$/p")
|
||||||
if [ "$builtinActionUsage" ]; then
|
if [ "$builtinActionUsage" ]; then
|
||||||
echo "$builtinActionUsage"
|
echo "$builtinActionUsage"
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user