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

add argument loading #28

Merged
merged 2 commits into from
Mar 12, 2024
Merged

add argument loading #28

merged 2 commits into from
Mar 12, 2024

Conversation

couleurm
Copy link
Contributor

added second idea from #24

I could've probably made it simpler by using &str but it involves using lifetimes and I haven't learned that yet, if you consider accepting feel free to brush off the rough corners of my addition (gave you push access to my branch).

src/vs_handler/mod.rs Outdated Show resolved Hide resolved
@quietvoid quietvoid force-pushed the feat/arg branch 2 times, most recently from 44e5189 to 5ed0246 Compare March 10, 2024 13:42
@quietvoid
Copy link
Owner

@couleurm Can you please test the changes.
The variables can be set with multiple -v args or a list delimited by ,.

vspreview-rs -v key=value -v ...
vspreview-rs -v key1=value1,key2=value2,...

@couleurm
Copy link
Contributor Author

couleurm commented Mar 11, 2024

hey, it'd be cool to stick to VSPipe's conventions

  • add aliases (-a and --arg) and support to use --arg var1=val1 --arg var2=val2
  • add some syntatic sugar by separating with them , to avoir redundancy, good call

this would make it much more convenient to switch back and from vs pipe and preview-rs, (i'm the prolly the only one who use them that much)

@quietvoid
Copy link
Owner

There's an alias now.

@quietvoid quietvoid merged commit 17aefc2 into quietvoid:main Mar 12, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants