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

Feature Request: subcommand for adding file to path #11

Open
Mukundan314 opened this issue Nov 20, 2021 · 2 comments
Open

Feature Request: subcommand for adding file to path #11

Mukundan314 opened this issue Nov 20, 2021 · 2 comments
Assignees

Comments

@Mukundan314
Copy link

Mukundan314 commented Nov 20, 2021

It would be nice to have a subcommand to download a file, add executable permissions, and add it to $PATH

usage I am thinking of:

zcomet bin <location of script> <name of binary>

zcomet bin https://raw.githubusercontent.com/dylanaraps/neofetch/master/neofetch neofetch
zcomet bin http://ix.io/client ix

would be happy to submit a pr for this.

If you feel that this is not within the scope of what zcomet is trying to achieve feel free to close this issue

@agkozak agkozak self-assigned this Nov 20, 2021
@agkozak
Copy link
Owner

agkozak commented Nov 20, 2021

A feature like that makes sense. It would also be easy to implement. The one thing I don't want to do, though, is to make design choices that I'll regret later, so if I add a bin subcommand, or something like it, I want to make sure that I'm really happy with it and that it will be easy to extend in the future without altering the fundamental simplicity of zcomet's syntax.

Can you be patient while I spend a couple of weeks experimenting with possibilities? I may ask you to test the new feature with me.

And thanks so much for the suggestion.

By the way, the examples you gave are really good ones. Could you continue to think of other examples? I'm particularly looking for difficult cases so that I can figure out how to handle them as smoothly as possible.

@agkozak
Copy link
Owner

agkozak commented Nov 20, 2021

I already have the code to handle "snippets," and that pretty much covers what you propose - I just need to place the target scripts in the PATH, probably in ~/.zcomet/polaris/bin -- and make sure they're executable. But even more common will be the use case where someone wants to add a subdirectory of a Git repository to PATH. That already occurs automatically when a bin/ subdirectory exists. What I need to do is to come up with the perfect set of subcommands to handle all of this stuff. That's what I'll be debating with myself.

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