Giter Club home page Giter Club logo

Comments (5)

maebert avatar maebert commented on August 23, 2024

Hi,

thanks for enjoying jrnl and your feedback! Interpreting \n as a carriage return makes sense, I'll implement that right away. Are you writing mostly inline one the command line, using the built-in editor (excuse the exaggeration) or an external editor? I'm thinking that maybe using the built-in editor Shift + Return could be interpreted as a line similar to most IM apps.

from jrnl.

notbalanced avatar notbalanced commented on August 23, 2024

I write the entries mostly inline on the command line. I'm not sure what you mean by the built-in editor...is that the "compose entry" mode that comes up when you just type "jrnl"? Doing something like a Shift-Return would also work for me.

Thanks for your reply.

from jrnl.

maebert avatar maebert commented on August 23, 2024

Okay, with fb3d7ab, \n will be converted to new lines. If using from the command line however you must wrap your entry in quotes OR escape the backslash, ie.

jrnl My new \n entry

will not work, but

jrnl "My new \n entry"

will, as will

jrnl My new \\n entry

In all of these cases, everything before the first line break will be interpreted as the entry's title (just as stuff before the first [.?!] already does)

from jrnl.

notbalanced avatar notbalanced commented on August 23, 2024

Hmmm, running on Windows 7 x64 bit with python 2.7 I don't have to escape the newlines as \\n. When I did, I got an extra slash on my entries. When I did:

jrnl Title.Line 1 \\nLine 2\\nLine 3

I got an entry like:

2012-07-05 12:18 Title.
Line 1\
Line 2\
Line 3

But if I just do the \n (with or without quotes), it was interpreting it correctly:

jrnl Title.Line 1 \nLine 2\nLine 3

I ended up with the proper entry:

2012-07-05 12:18 Title.
Line 1
Line 2
Line 3

Entries encapsulated in quotes worked as you described.

Either way, this works great for me and solves my issue perfectly. Thanks for the update!

from jrnl.

maebert avatar maebert commented on August 23, 2024

Aah, okay, only tested the patch on unix with bash - I suppose different shells treat \n in the arguments differently. Glad it works for you!

from jrnl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.