Skip to content

Updated history to escape history entries differently#411

Closed
fdncred wants to merge 4 commits intokkawakam:masterfrom
fdncred:master
Closed

Updated history to escape history entries differently#411
fdncred wants to merge 4 commits intokkawakam:masterfrom
fdncred:master

Conversation

@fdncred
Copy link
Copy Markdown

@fdncred fdncred commented Jun 29, 2020

@gwenn How's this for a fix for #409?

I used the snailquote escaping/unescaping crate found here

I tested it with nushell and it seemed to work, once I straightened out my history.txt file

@fdncred
Copy link
Copy Markdown
Author

fdncred commented Jun 29, 2020

There is an unwrap() in there because I wasn't sure what else to do.

@gwenn
Copy link
Copy Markdown
Collaborator

gwenn commented Jun 30, 2020

Thanks for your PR but:

  • The only thing we want is to make the distinction between single-line and multi-lines entry in history.
    To do so we need to escape '\n'.
    But we have to also escape '\' to avoid ambiguity.
    And that's all !
  • We may also need to timestamp entries for history left in broken state #400.
    So it seems wise to implement our own "parser" which should help supporting new format(s).

See #412.

@fdncred
Copy link
Copy Markdown
Author

fdncred commented Jun 30, 2020

@gwenn Ok. Looks good to me. Thanks for putting my test in there.

@fdncred fdncred closed this Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants