notesmd-cli icon indicating copy to clipboard operation
notesmd-cli copied to clipboard

New line doesn't get interpreted inside `--content`

Open danielwerg opened this issue 2 years ago • 2 comments

obsidian-cli version v0.1.7

Maybe flag count be added to interpret?

To Reproduce

Steps to reproduce the behavior:

  1. obsidian-cli create "{NOTE}" --append --content "\nprint this in new line"
  2. See below

Before:

Blah blah blah

After:

Blah blah blah\nprint this in new line

Expected behaviour

Blah blah blah
print this in new line

Additional context

I have tried obsidian-cli create "{NOTE}" --append --content "\\nprint this in new line" with no luck

Workarounds

obsidian-cli create "{NOTE}" --append --content "$(echo -e "\nprint this in new line")"
obsidian-cli create "{NOTE}" --append --content "
print this in new line"

danielwerg avatar Jul 26 '24 14:07 danielwerg

Thanks for the feedback, this is a good idea and should definitely be added. It shouldn't take long, but I am not actively working on this project right now but if you're able to make a PR, that would be amazing.

Yakitrak avatar Jul 27 '24 11:07 Yakitrak

Latest release handles this among other characters: https://github.com/Yakitrak/obsidian-cli/releases/tag/v0.1.8

Thanks for raising this!

Yakitrak avatar Dec 27 '24 20:12 Yakitrak