ssadler / hawk

Awk for Hoodlums
BSD 3-Clause "New" or "Revised" License
35 stars 2 forks source link

reimplement -d #51

Closed gelisam closed 11 years ago

gelisam commented 11 years ago

40 broke -d, we should bring it back.

Is it important for the argument to -d to be an arbitrary string, or can it be restricted to a single character?

gelisam commented 11 years ago

Oh, something we should not forget to test: -d\n should be interpreted as a newline, not as a literal backslash.

melrief commented 11 years ago

In Options.hs there is a function called delimiter that should handle backslashes.

About -d, the package Data.ByteString.Search has already implemented the split on a string delimiter, so I think we can stay with that. Why do you want to use a single character?

As side note, I think it would be even nicer if we could define delimiters using something like regexp.

gelisam commented 11 years ago

No particular reason. Char, String, and regexp are all fine with me.

– Samuel

On 2013-08-16, at 8:05 PM, Mario Pastorelli notifications@github.com wrote:

In Options.hs there is a function called delimiter that should handle backslashes.

About -d, the package Data.ByteString.Search has already implemented the split on a string delimiter, so I think we can stay with that. Why do you want to use a single character?

As side note, I think it would be even nicer if we could define delimiters using something like regexp.

— Reply to this email directly or view it on GitHub.