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
update/improve gi command #20
Comments
Those are all great suggestions. Which OS and Shell are you using? I'll have to test it across a few different platforms to make sure I can roll it into everything. |
I use Bash and Linux mostly. |
btw any reason you use |
In your first comment what does |
the same goes for
IFS is a variable bash uses in several situations, in this case I use it so when the notice that in order to do this I used there's other ways to prevent that but this works fine. |
Thanks for the explanation. I feel like I need an advanced section to the site to explain some of these options. My goal was to keep the installation script as simple as possible, but you're showing that there are definitely a lot of use cases that I did not take into account. When I get a few hours, I'll have to try these out and see what would be simplest to implement Thanks a lot of your input, it's been very helpful. |
If you want a one line version for bash.
|
that's a good one, equivalent to the first form proposed (the one without additional arguments for curl/wget) the command substitution should be quoted tho, otherwise it might break if there's a whitespace literal on any argument, which is unlikely but should be covered I guess
|
the
gi
command is currently implemented as:which works by invoking it as
gi linux,java
however it could be reimplemented as:that would allow calling it as
gi python java
which is more natural.a second improvement would be to implement it like this:
this allows invocations as the previous but also permits passing arguments to
curl
like:gi --proxy somewhere:8080 -- linux python
also notice the keyword
function
isn't strictly necessary if you writegi()
as the definition.The text was updated successfully, but these errors were encountered: