diff --git a/test_complete.sh b/test_complete.sh index 235857eb8d73e5deae82a76e299e1fb502ecf9bd..08df3d674286629d55762c4af3bab18370535500 100644 --- a/test_complete.sh +++ b/test_complete.sh @@ -4,7 +4,7 @@ _validate_workflow_completion() { COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" - opts=$(cat $SELF | grep "^#hh\s-., --[a-z]" | sed -e "s/^#hh.*\(-.\), \(--[a-z-]*\).*/\1 \2/g") + opts=$(grep -rE "^#hh\s+-., --[a-z]+" "${SELF}" | sed -e "s/^#hh.*\(-.\), \(--[a-z-]*\).*/\1 \2/g") 2>&1 echo "OPTS:$opts" case "$prev" in --pipe)