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

Allow specifying output path #3

Open
technodrome opened this issue Jan 1, 2021 · 2 comments
Open

Allow specifying output path #3

technodrome opened this issue Jan 1, 2021 · 2 comments

Comments

@technodrome
Copy link

technodrome commented Jan 1, 2021

Hi, thanks for an useful utility!

However, it currently has output path hardcoded, which makes it unusable for VS Code Insiders (different path). I know it is possible to generate output file with -p and manually copy it, but why? The whole point of this tool is automation. So let's automate properly.

Please allow a flag -o (currently commented out in your code) to specify where to output the snippets. Or better yet, allow storing such configuration so it is remembered (.toml/.yaml, ...) between runs.

@djyde
Copy link
Owner

djyde commented Jan 4, 2021

Hi technodrome, thanks for your advice.

The reason I commented out the -o is because i think we can use -p and the > operator to do the same thing but more flexible. Like

snp -p > my.json

is equal to:

snp -o my.json

I am considering adding an extra option (maybe -i) to output to VS Code Insiders path, for example:

snp -u -i

How do you think about it?

@technodrome
Copy link
Author

Thanks for finding time to reply, @djyde.

Sure thing, you can automate it with a shell alias but that's an extra step that shouldn't be necessary. If Insiders or Code paths should change, you'd have to redistribute a new version. But if you create a small config file with paths, there's nothing you need to change - only the user.

So I'd personally go for giving the user an ability to customize stuff as they want so you don't have to support hardcoded paths in the long run. You might find such config file useful for other operations in the future as well.

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