nap icon indicating copy to clipboard operation
nap copied to clipboard

Not saved snippet

Open Cruising0904 opened this issue 1 year ago • 12 comments

Describe the bug image I make snippet like this, after close and open nap again then it is not loaded

In ~/.local/share/nap directory there are some files I previously created in nap which do not show in the application image

also the application shows depends on directory In .config image I never made Notes folder and FizzBuzz but I did usage

In ~/.dotfiles which I put my config files here Nothing survive from here In addition I put nap binary here.

Lastly $HOME directory image It appears to show snippets just minute ago

image

Expected behavior Whenever execute nap have the same data

Desktop (please complete the following information):

  • OS: Arch Linux
  • Browser brave

I love this program ❤️

Cruising0904 avatar Apr 18 '23 20:04 Cruising0904

It seems like it does not support absolute path. it keeps generating relative path from where I execute nap

Cruising0904 avatar Apr 19 '23 07:04 Cruising0904

What does your config look like?

Also what version are you using?

jolheiser avatar Apr 19 '23 16:04 jolheiser

What does your config look like?

Also what version are you using?

Thanks for the quick answer. I will let you know when I get home

Cruising0904 avatar Apr 20 '23 23:04 Cruising0904

sorry for the late

What does your config look like? my config was just default setting like github page

image

Also what version are you using? I installed with go

I could not identified the version of application image

and.. My env is like image

Cruising0904 avatar Apr 23 '23 00:04 Cruising0904

Note that the example uses ~ for home, not $HOME. Env vars are not expanded in the config afaik.

jolheiser avatar Apr 24 '23 14:04 jolheiser

Note that the example uses ~ for home, not $HOME. Env vars are not expanded in the config afaik.

The way I put $HOME becuse it created '~' in every directory I add nap. It was the same when I did with ~/.config/nap That is why I changed it. And with or without it consequences are the same 😥 I will upload again with the result of after change the config too!

Cruising0904 avatar Apr 24 '23 20:04 Cruising0904

Ah, actually I bet I know the issue. The tilde expansion isn't in a released version.

You would need an absolute path until then if you're using the current latest.

jolheiser avatar Apr 24 '23 20:04 jolheiser

Thanks~ will try this. I thought relative path is not working so I thought I put absolute path with $HOME this is not it haha I guess I have to put like /home/username/~ ?

Cruising0904 avatar Apr 24 '23 21:04 Cruising0904

Thanks~ will try this. I thought relative path is not working so I thought I put absolute path with $HOME this is not it haha I guess I have to put like /home/username/~ ?

Right, $HOME isn't absolute, it would need to be expanded (which is probably a decent feature request 😉). Using something like /home/<user>/... should work for the time being. 🙂

jolheiser avatar Apr 24 '23 21:04 jolheiser

Thanks for kind answer.
Now I have tried editing config file, removing ~/.config/nap, ~/.local/share/nap , rebooting, reinstalling (after removing binary and go install github.com/maaslalani/nap@main) not affected. What else should I look for?

Cruising0904 avatar Apr 25 '23 08:04 Cruising0904

If you are using main you should be able to use ~. If not, let me know if your config has changed more.

jolheiser avatar Apr 26 '23 14:04 jolheiser

Sorry for the late reply...

However that is not the point. The app create hidden folder where the command executed respectively. call nap from home directory it creates its json file in hidden folder save snippets in the file after call nap from go directory it also creates its json file in its hidden folder saves snippets in the file there will be ~/$HOME/.nap/snippets.json, go/$HOME/.nap/snippets.json In Consequences I might forget the contents after while I forget where I called it from.. Hopefully I made it clear..

Cruising0904 avatar May 11 '23 03:05 Cruising0904