out-of-cheese-error / the-way

A code snippets manager for your terminal.
MIT License
352 stars 16 forks source link

I tried `the-way view 14` but my cursor gets stuck. When I press Ctrl+d it kills the whole terminal. #129

Open jgarte opened 2 years ago

jgarte commented 2 years ago

Some of these, specifically those with serde crates, are easy to add as both import/export formats.

I primarily would like to have markdown and plaintext export.

sexps would be awesome too!

plaintext / markdown would be difficult to support as an import format, but easier for export. What would be the difference between plaintext and running the-way view?

It requires an index so I would need to write a for loop to get all the snippets out. I'd prefer to be able to just dump all the snippets to stdout or to dump snippets to stdout filtered by tags, etc... from the CLI directly.

I tried the-way view 14 but my cursor gets stuck. When I press Ctrl+d it kills the whole terminal:

2022-02-07-231638_1573x876_scrot

I'm running the-way 0.15.0.

Originally posted by @jgarte in https://github.com/out-of-cheese-error/the-way/issues/127#issuecomment-1032193663

Jarsop commented 2 years ago

Some of these, specifically those with serde crates, are easy to add as both import/export formats.

I primarily would like to have markdown and plaintext export.

sexps would be awesome too!

plaintext / markdown would be difficult to support as an import format, but easier for export. What would be the difference between plaintext and running the-way view?

It requires an index so I would need to write a for loop to get all the snippets out. I'd prefer to be able to just dump all the snippets to stdout or to dump snippets to stdout filtered by tags, etc... from the CLI directly.

I tried the-way view 14 but my cursor gets stuck. When I press Ctrl+d it kills the whole terminal:

2022-02-07-231638_1573x876_scrot

I'm running the-way 0.15.0.

Originally posted by @jgarte in #127 (comment)

Please can you provide the snippet which raise that issue (as code block or gist) ? This can be useful to reproduce the problem :)

jgarte commented 2 years ago
 λ the-way view 14

■ #14. guix package template | scheme :guix:package:

(define-public XXX
  (package
    (name "XXX")
    (version "XXX")
    (source
      (origin XXX))
    (build-system XXX)
    (home-page "XXX")
    (synopsis "XXX")
    (description "XXX")
    (license XXX)))
Jarsop commented 2 years ago

I tried your snippet and I can't reproduce your problem. Can you provide us more information about your environment as:

Jarsop commented 2 years ago

Maybe you use Windows with cmder (I saw the lambda symbol at end of your prompt)

jgarte commented 2 years ago

@Jarsop

shell is bash terminal is st no terminal multiplexer when I tested that I was using this Guix package that I made.

Maybe there is a version mismatch in the Guix package that is causing the bug?

Ninjani commented 2 years ago

Does this happen with all of your snippets or just this one? One possibility is that something's going wrong with the ANSI codes. I've made a branch that clear ANSI styling at the end of each highlighted line - could you test this out?

jgarte commented 2 years ago

Hi, sorry I'm late on this. Do you still have that branch I can test with?

Could you also provide the steps for testing?

Thanks

Ninjani commented 2 years ago

This has been merged to main now, is the issue still happening with the latest release?