Not saved snippet
Cruising0904 opened this issue · 12 comments
Describe the bug
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
also the application shows depends on directory
In .config
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
It appears to show snippets just minute ago
Expected behavior
Whenever execute nap have the same data
Desktop (please complete the following information):
- OS: Arch Linux
- Browser brave
I love this program ❤️
It seems like it does not support absolute path. it keeps generating relative path from where I execute nap
What does your config look like?
Also what version are you using?
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
Note that the example uses ~
for home, not $HOME
.
Env vars are not expanded in the config afaik.
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!
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.
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/~ ?
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. 🙂
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?
If you are using main
you should be able to use ~
. If not, let me know if your config has changed more.
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..