saccarosium / shell-velocity

A portable notational velocity for your shell written in POSIX shell.
MIT License
32 stars 5 forks source link

Opens existing notes as new file with .md extension #11

Open counterapparatus opened 6 months ago

counterapparatus commented 6 months ago

Hi,

I am really exciting about setting up and using Shell Velocity but I've run into a problem that might just be user error.

I have set SHV_PATH to my existing NVALT directory. When I run 'shv' I see all the files and the search works fine, however when I select the file it opens a blank document with an additional .md extension. For example if I select reading-notes.md it opens reading-notes.md.md which is empty.

counterapparatus commented 6 months ago

Okay, I've just realized that the problem is that the majority of my files have spaces in the filename because of the way nvAlt saved my files. Thus, when I open reading notes.md, it tries to replace the space with a - and gives it a new file name (reading notes.md -> reading-notes.md.md)

saccarosium commented 6 months ago

Hi, I need some more information to understand better the problem:

Also yes having white spaces in the filename can definitely make things behave weirdly. I'd suggest for your sanity to rename your files to have underscores or dashes instead of spaces. It will make thing much easier to process things on the command line. I suggest you to look into vimv to bulk rename files.