gabebw / most-used

Find your most-used shell commands
BSD 3-Clause "New" or "Revised" License
12 stars 0 forks source link

Parse items with trailing newlines #7

Closed gabebw closed 7 years ago

gabebw commented 7 years ago

The sepBy eats the trailing escaped newline (I think) when trying to parse a command like this:

"fc \\n"
        it "can parse something with a bare escaped newline" $ do
            let s = cmd "cmd \\n "
            -- let s = cmd "fc -lDt '%Y-%m-%d %H:%M:%S' 1"
            let item = Item "cmd" [NotQuoted "\\n"]

            parseHistory s `shouldBe` Right [item]
gabebw commented 7 years ago

Fixed in 8e5040fcd04fd40927e2dc73689d916ab96c37d7