> This looks nicer here in the script, but doesn't test exactly what users > type most of the time, I suppose. > > So how about this? Looks good to me, though I had a nagging feeling at first that the regex could be made more concise. Why do we need the optional "[^ ]" inside \1 ? > + sed -e "s/^ \([^ ]* repo\) .*/-\1/" <actual >expect &&