Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not saved snippet #49

Open
Cruising0904 opened this issue Apr 18, 2023 · 12 comments
Open

Not saved snippet #49

Cruising0904 opened this issue Apr 18, 2023 · 12 comments

Comments

@Cruising0904
Copy link

Cruising0904 commented Apr 18, 2023

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
Copy link
Author

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

@jolheiser
Copy link
Collaborator

jolheiser commented Apr 19, 2023

What does your config look like?

Also what version are you using?

@Cruising0904
Copy link
Author

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
Copy link
Author

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

@jolheiser
Copy link
Collaborator

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

@Cruising0904
Copy link
Author

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!

@jolheiser
Copy link
Collaborator

jolheiser commented Apr 24, 2023

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.

@Cruising0904
Copy link
Author

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/~ ?

@jolheiser
Copy link
Collaborator

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. 🙂

@Cruising0904
Copy link
Author

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?

@jolheiser
Copy link
Collaborator

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

@Cruising0904
Copy link
Author

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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants